Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combining travis and ec2

I have a github project that uses travis for continuous integration. I would like to deploy my project on amazon ec2. In order to simplify deployment, I would like the deployed system to have the same configuration as the test system. Is this possible?

AFAICT, this requires two things: First, an ec2 preconfigured instance that matches the settings used by travis. Does one exist? And second, a way to execute travis.yml scripts from the command line. How can I do that?

like image 965
Mike Izbicki Avatar asked Jul 11 '15 09:07

Mike Izbicki


1 Answers

As for executing .travis.yml scripts from the command line, if I were you I would instead take it the other way around and replace your .travis.yml script with something like this:

language: bleh

etc etc...

install:
  - ./travis-scripts/install.sh

before_script:
  - ./travis-scripts/before_script.sh

script:
  - ./travis-scripts/script.sh

Of course, you will still have to write a script for installing whatever language versions, Travis plugins etc you need on your Amazon EC2 instance.

As for an Amazon EC2 instance that matches Travis VMs, I don't know about that because I'm not so familiar with Amazon AWS, but I can tell you that Travis VMs are based on Ubuntu 12.04, and there is a lot more specific information in the page about The Build Environment.

like image 173
Beetle Avatar answered Nov 06 '22 07:11

Beetle