You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-13Lines changed: 23 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# README
2
2
3
-
Version 0.1.4, August 10 2023
3
+
Version 0.1.5, August 10 2023
4
4
5
5
This repository includes scripts, tooling and documentation to provision an instance of CML on Amazon Web Services (AWS).
6
6
@@ -69,7 +69,7 @@ If you need to use a proxy to access AWS then define it using environment variab
69
69
70
70
This section describes the resources required by the provisioning scripts to successfully deploy CML on AWS. These configurations and policies need to be created prior to using the tooling. This can be done on the AWS console or via the preferred deployment method (e.g. also via Terraform).
71
71
72
-
> **Note** There's also a [video on YouTube](https://youtu.be/vzgUyO-GQio) which shows all the steps outlined below.
72
+
> **Note:** There's also a [video on YouTube](https://youtu.be/vzgUyO-GQio) which shows all the steps outlined below.
73
73
74
74
### IAM user and group
75
75
@@ -109,7 +109,7 @@ To create the policy, go to "Policies", then click "Create policy". There select
109
109
110
110
Replace "bucket-name" to the bucket name of your S3 bucket. This permits Read/Write and List access to the specified bucket and all objects within that bucket.
111
111
112
-
> **Note** This could be further tightened by removing the "PutObject" action from the policy as the EC2 instance / the CML controller only needs read access ("GetObject") and not write access access ("PutObject"). However, to upload images into the bucket, the write access is required at least initially.
112
+
> **Note:** This could be further tightened by removing the "PutObject" action from the policy as the EC2 instance / the CML controller only needs read access ("GetObject") and not write access access ("PutObject"). However, to upload images into the bucket, the write access is required at least initially.
113
113
114
114
Click "Next" and provide a policy name, "cml-s3-access" for example. Finally, click "Create policy".
115
115
@@ -118,13 +118,23 @@ Click "Next" and provide a policy name, "cml-s3-access" for example. Finally, cl
118
118
Now that we have the S3 access policy, we can create a role that uses this policy.
119
119
120
120
1. go to "Roles"
121
+
121
122
2. click "Create role"
123
+
122
124
3. select "AWS service" for the "Trusted entity type" (the default)
125
+
123
126
4. select "EC2" for the "Use case"
127
+
124
128
5. click "Next"
129
+
125
130
6. select the S3 access policy that was created in the previous section ("cml-s3-access") from the permission policy list
131
+
126
132
7. scroll to the bottom and click "Next"
127
-
8. provide a role name, use "s3-access-for-ec2" (this is important to note as this is the policy name that is also referenced in the Terraform configuration to deploy CML)
133
+
134
+
8. provide a role name, use "s3-access-for-ec2" (this is important to note as this is the policy name that is also referenced in the Terraform configuration to deploy CML and in the inline role assignment). See [here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance), search for `iam_instance_profile`, it says
135
+
136
+
> IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
137
+
128
138
9. click "Create role" at the bottom right
129
139
130
140
### Attach policies to user
@@ -167,7 +177,7 @@ To add these permission follow these steps:
167
177
- in the "Resources" section click "Add arn"
168
178
- in the dialog "Specify ARNs"
169
179
- click "This account"
170
-
- in the last field, add the "cml-s3-access" policy to the end of the arn. It will look like "arn:aws:iam::111111111111111:role/cml-s3-access" (where the numbers represent your account ID, which is already inserted for you by the UI)
180
+
- in the last field, add the "s3-access-for-ec2" policy to the end of the arn. It will look like "arn:aws:iam::111111111111111:role/s3-access-for-ec2" (where the numbers represent your account ID, which is already inserted for you by the UI)
171
181
- click "Add ARN"
172
182
- click "Next"
173
183
- provide a Policy name, "pass role" works
@@ -309,7 +319,7 @@ There are currently two scripts provided for CML instance customization.
309
319
310
320
There's also a dummy entry in that list as the list must have at least one element. So, when not doing any of the predefined entries, at least the dummy must be present.
311
321
312
-
> **Note** PATty is currently not available as a standalone .deb file. We will include it with 2.6.1 as part of the controller distribution (in addition to installing it).
322
+
> **Note:** PATty is currently not available as a standalone .deb file. We will include it with 2.6.1 as part of the controller distribution (in addition to installing it).
313
323
314
324
#### Sys section
315
325
@@ -335,7 +345,7 @@ Here, the reference platforms are listed which should be copied from the S3 buck
335
345
336
346
It's mandatory that for each definition at least **one** matching image definition must be listed and that the name of these node and image definitions match with the names in the specified S3 bucket.
337
347
338
-
> **Note** The external connector and unmanaged switch are baked into the software, there's no need to have them listed here again.
348
+
> **Note:** The external connector and unmanaged switch are baked into the software, there's no need to have them listed here again.
339
349
340
350
### Required "layout" of the software bucket
341
351
@@ -363,15 +373,15 @@ $ aws s3 ls --recursive s3://aws-bucket-name/
> **Note** The Debian package is in the top folder of the bucket and the platform files are in the refplat folder. Within that folder, the structure is identical to the structure of the reference platform ISO image.
376
+
> **Note:** The Debian package is in the top folder of the bucket and the platform files are in the refplat folder. Within that folder, the structure is identical to the structure of the reference platform ISO image.
367
377
368
378
Uploading the files into the S3 bucket is only required for the first time or when updating software. Even when CML instances are stopped / destroyed, the software in the S3 bucket is typically not removed.
369
379
370
380
#### Upload script
371
381
372
382
The upload tool makes it easy to quickly select and upload the software package and images to a defined S3 bucket (the bucket must exist already).
373
383
374
-
> **Note** The required CML software is the "pkg" file that is available for download from the Cisco software download page. Example: `cml2_2.6.0-5_amd64-5.pkg`. Note the .pkg suffix.
384
+
> **Note:** The required CML software is the "pkg" file that is available for download from the Cisco software download page. Example: `cml2_2.6.0-5_amd64-5.pkg`. Also note the .pkg suffix.
375
385
>
376
386
> Placing the .pkg file into the directory with the upload tool will automatically extract the needed Debian package and offer the user to upload that package to the S3 bucket.
377
387
@@ -383,7 +393,7 @@ The tool will then display a simple dialog where the images which should be copi
383
393
384
394
After selecting OK the upload process will be started immediately. To abort the process, Ctrl-C can be used.
385
395
386
-
> **Note** If a CML2 .pkg file is present in the directory where the tool is started, then the tool will offer to upload the software to the bucket.
396
+
> **Note:** If a CML2 .pkg file is present in the directory where the tool is started, then the tool will offer to upload the software to the bucket.
387
397
388
398
Help can be obtained via `./upload-images-to-aws.sh --help`.
389
399
@@ -537,7 +547,7 @@ The system is running and the VIRL2 target (CML) is active!
537
547
538
548
Prior to stopping the instance, the licensing token must be removed via the UI. Otherwise it's still considered "in use" in Smart Licensing. This is done via the UI or using the `del.sh` script / SSH command which is provided as part of the deploy output (see above). Then run the destroy command.
539
549
540
-
> **Note** The `del.sh` has no output if the command is successful.
550
+
> **Note:** The `del.sh` has no output if the command is successful.
At this point, the compute resources have been released / destroyed. Images in the S3 bucket are still available for bringing up new instances.
594
604
595
-
> **Note** Metal instances take significantly longer to bring up and to destroy. The `m5zn.metal` instance type takes about 5-10 minutes for both. Deployment times also depend on the number and size of reference platform images that should be copied to the instance.
605
+
> **Note:** Metal instances take significantly longer to bring up and to destroy. The `m5zn.metal` instance type takes about 5-10 minutes for both. Deployment times also depend on the number and size of reference platform images that should be copied to the instance.
596
606
597
607
## Troubleshooting
598
608
@@ -604,7 +614,7 @@ In case of errors during deployment or when the CML instance won't become ready,
604
614
- check for errors in the log files in the `/var/log/cloud/` directory
605
615
- check output of `cloud-init status`
606
616
607
-
> **Note** Not all instance flavors have a serial console but metal flavors do!
617
+
> **Note:** Not all instance flavors have a serial console but metal flavors do!
0 commit comments