Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hugo/fogros2: Changed to generic ami image #9

Merged
merged 2 commits into from
Feb 23, 2022
Merged

Conversation

zhanhugo
Copy link
Collaborator

Changed the existing ami image which contains a working ros_rolling installation and other dependencies to a generic ami image. Implemented automated process of installing ros_rolling and dependencies needed in the other automated processes ran after the installation.

Changed the existing ami image which contains a working ros_rolling
installation and other dependencies to a generic ami image. Implemented
automated process of installing ros_rolling and dependencies needed in
the other automated processes ran after the installation.
@@ -145,7 +175,7 @@ def __init__(
region="us-west-1",
ec2_instance_type="t2.micro",
disk_size = 30,
ami_image = "ami-08b3b42af12192fe6",
ami_image = "ami-01f87c43e618bf8f0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we hardcoding this if we're creating it anew?

@vmayoral
Copy link
Collaborator

1+ for this, I think we want it this way. The AMI pre-cooking is always something that could be facilitated, however I think we can take it a step further.

@zhanhugo and @KeplerC, how about "defaulting" to this new "creational" approach, but letting users define a pre-existing AMI from the launch files?

In other words, using #6:

    machine1 = fogros2.AWS(region="us-west-1", ec2_instance_type="t2.medium")    

will provision a new AWS machine and install ROS 2 Rolling from the ground-up, as contributed in here. Then:

    machine1 = fogros2.AWS(region="us-west-1", ec2_instance_type="t2.medium", ami="ami-01f87c43e618bf8f0")    

will provision a new AWS machine using the pre-existing ami-01f87c43e618bf8f0.

@KeplerC
Copy link
Collaborator

KeplerC commented Feb 23, 2022

I checked on the AWS console and found Ubuntu 20.04 have different image IDs across regions (I thought it was some kind of hash that is deterministic). We should do it as Victor suggested.

@ghassemiramtin Can you also verify that the same set of commands also work for GCP? If so, I may merge this branch

Took out the default values for ami_image arguments in the AWS init. Specified ami_image when creating the ec2 instance in the talker example launch file.
@KeplerC KeplerC merged commit 7952f2a into main Feb 23, 2022
@ghassemiramtin
Copy link
Collaborator

I found a new GCP API that allows us to find an image based on a family of OS's. I don't think I have to worry about the image. Running a set up script on GCP can also be done through the API (there is some functionality to configure the OS, run set up scripts, etc.). So perhaps I will use that instead.

@mjd3 mjd3 deleted the hugo/generic-ami-image branch May 5, 2022 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants