Configure Instances Internet Access
|
If you are using a personal account, the base domain name you created will incur some minor cost.
If you are using a institutional account, the base domain name may need to be created by your IT department, and you may need to use a subnet managed by your IT department.
|
Instances Management Tasks Using the Scripts
|
The Scripts create and manage one or multiple AWS instances based on the configuration files “instancesNamesFile.txt”, resourcesIDs.txt and tags.txt .
You can choose a different name for “instancesNamesFile.txt”, and you can use multiple “instancesNamesFile…” files to handle unforseen instances management requests.
Those files must be placed inside a directory called inputs , and inputs inside a “course/workshop” directory whose name you can choose.
You run each of the Scripts by specifying only the path of your “instancesNamesFile.txt” as a parameter, for example csinstances_create.sh course-name/inputs/instancesNamesFile.txt .
You should not run the Scripts inside a “course” directory without specifying the name of the “course” directory — use the Tab key to help you complete the commands that run the Scripts.
It is convenient to be logged in to the AWS Console, in the EC2 - Instances page, to check the runs of the Scripts affect the target instances state as expected, and to quickly reboot an instance to run the configuration step if needed.
|
AMIs Management
|
Creating an AMI involves three main steps (1) creating an instance, (2) configuring the instance as required regarding software and data, and (3) registering the configured instance as an AWS AMI.
Step (1) — we create and manage instances to-become-AMIs in the same way we manage instances for courses but use a different directory called amis at the same level as courses. We also manage a tests directory at the same level for managing instances for tests.
Step (3) — we register/create AMIs, make them public or private, and delete them using the AWS Console.
Step (2) — configuring instances to-become-AMIs may be simple or rather complex depending on what needs to be updated, and may involve configuring that enables use of specific AWS (virtualised) “hardware platform” components (cf. ENA or Elastic Network Adapters). We use scripts whenever possible to help configuring such instances. It helps reducing mistakes, automating complex tasks, and documenting our work.
|
The Scripts Design
|
The Scripts comprise a modular organisation wherein each script is a module with a specific task that can be applied to one or multiple instances.
The Scripts communicate through shared files in the inputs and outputs directories of a “course”.
The AWS CLI Command Reference was our starting point to develop the Scripts based on the code examples therein.
|