Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to create AWS Linux instance on the fly so that it could pull a source code from a private gihub repository? My main obstacle is that github requires private keys which I assumably should generate on my Linux instance and manually insert into github profile on site. Can this be automated?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You could automate this using an EBS instance and creating an AMI to launch new instances off of.

You could setup a script that would run on boot - check to see if the code was pulled, and if not: set it up. (e.g.: /etc/rc.local and have that run a custom bash script )

You'd have to load your key in manually just that time (And any subsequent time should your github key change).

Then, any time you spin up a new instance of your AMI it would perform this check/get operation on boot.

Should your infrastructure require a more sophisticated method of everything, you could utilize puppet or chef on a 'command server' to manage this deployment more intelligently from a single host and not a bundled AMI.

share|improve this answer

I suggest creating an AMI that has puppet installed. You can then use that as a base to configure any number of images with any number of profiles from one AMI image.

Centralized configuration == automatic deployment and a simplified life. In this particular case, your private key that you generated would be part of a file that is distributed to the relevant instance(s).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.