Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

functional tests: re-purpose aws.sh for generating AMIs #2736

Merged
merged 2 commits into from
Jul 20, 2016

Conversation

iaguis
Copy link
Member

@iaguis iaguis commented Jun 1, 2016

This changes the aws.sh script to generate AMIs with the rkt
dependencies installed so they can be used in Jenkins.

cc @albanc

@iaguis iaguis added this to the v1.8.0 milestone Jun 1, 2016
@iaguis iaguis force-pushed the iaguis/jenkins-amis branch 3 times, most recently from 679f0f9 to 593a28f Compare June 6, 2016 09:47
@lucab lucab modified the milestones: v1.9.0, v1.8.0 Jun 9, 2016
@lucab
Copy link
Member

lucab commented Jun 9, 2016

Not sure about the status of this, but not ready for 1.8.0. Assigned to @alban as part of the bigger Jenkins task.

@iaguis
Copy link
Member Author

iaguis commented Jun 9, 2016

@alban PTAL

@alban
Copy link
Member

alban commented Jun 10, 2016

sleep 30
done

AMI_ID=$(aws --region $REGION ec2 create-image --instance-id $INSTANCE_ID --name $DISTRO-rkt-test --output text)
Copy link
Member

Choose a reason for hiding this comment

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

Don't you need to stop the instance before taking the snapshot?

Copy link
Member Author

Choose a reason for hiding this comment

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

Creating the image will stop the instance.

@tmrts
Copy link
Contributor

tmrts commented Jun 21, 2016

ping

@@ -125,50 +87,49 @@ INSTANCE_ID=$(aws ec2 run-instances \
)
echo INSTANCE_ID=$INSTANCE_ID

aws ec2 create-tags --resources $INSTANCE_ID \
Copy link
Member

Choose a reason for hiding this comment

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

could we still add some tags? So if the script is interrupted, we know what were the EC2 instances created for.

@alban alban modified the milestones: v1.11.0, v1.9.0 Jun 22, 2016
@alban
Copy link
Member

alban commented Jun 22, 2016

Moving to milestone v1.11.0, when @iaguis will have some time to continue this.

@iaguis iaguis changed the title [WIP] functional tests: re-purpose aws.sh for generating AMIs functional tests: re-purpose aws.sh for generating AMIs Jul 19, 2016
@iaguis
Copy link
Member Author

iaguis commented Jul 19, 2016

Updated. Wrote some documentation.

chmod +x /var/tmp/rkt-test.sh

systemd-run --unit=rkt-test /var/tmp/rkt-test.sh
sudo sed -i 's/ requiretty$/ !requiretty/g' /etc/sudoers
Copy link
Member

Choose a reason for hiding this comment

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

Does this "sudo" work?

Is it still executed by --user-data file://$CLOUDINIT? Then doesn't it already run as root?

Otherwise, the patch on /etc/sudoers is to fix sudo, so not sure you can use sudo for this command if it does not work...

Copy link
Member Author

Choose a reason for hiding this comment

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

TBH I haven't tried centos...

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. I can remove the sudo from everywhere. Thanks!

This changes the aws.sh script to generate AMIs with the rkt
dependencies installed so they can be used in Jenkins.
@iaguis
Copy link
Member Author

iaguis commented Jul 20, 2016

Updated with a debian-testing cloudinit (as per #2951).

@alban
Copy link
Member

alban commented Jul 20, 2016

LGTM

@iaguis
Copy link
Member Author

iaguis commented Jul 20, 2016

Fixes #2951

@iaguis
Copy link
Member Author

iaguis commented Jul 20, 2016

Functional tests don't make sense here. Merging.

@iaguis iaguis merged commit 4d5f515 into rkt:master Jul 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants