Press "Enter" to skip to content

Tag: amazon ec2

Running Jenkins CI for PHP on Amazon EC2 [6/7]

Continued from Installing and Configuring Jenkins CI Make a backup of the Amazon EC2 configuration Log into your Amazon Ec2 account Under the “My instances” select your Jenkins install Under “Instance Actions” to “Create Image (EBS AMI)” and give it an appropriate name and description It is advisable to shutdown your EC2 image when you are not using it to avoid billing (not so important with the free Micro instance, but a good practice to get into) Continued in Relaunching the Amazon EC2 image

Running Jenkins CI for PHP on Amazon EC2 [5/7]

Continued from Connecting to Amazon EC2 using PuTTY Installing and Configuring Jenkins CI Connect to your Amazon EC2 image as per Connecting to Amazon EC2 using PuTTY In the SSH window, run: sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo In the SSH window, run: sudo rpm –import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key In the SSH window, run: sudo yum install jenkins In the SSH window, run: sudo service jenkins start Whilst we are waiting for Jenkins to start up, we can install PHP and associated modules In the SSH window, run: sudo yum install php git In the SSH window, run: wget http://pear.php.net/go-pear.phar;sudo php go-pear.phar You will be prompted if you want to make any changes to the PEAR installation. Select to change the “Installation base ($prefix)” 1 to /usr You will be prompted if “Would you like to alter /etc/php.ini”, select “Yes” In the SSH window, run: sudo pear config-set auto_discover 1 sudo yum install php-devel gcc make ImageMagick ImageMagick-devel php-dom php-pdo dbus-devel libxml2 libxml2-devel ant php-mbstring swig In the SSH window, run: sudo pecl install xdebug channel://pecl.php.net/dbus-0.1.1 In the SSH window, run: sudo pear install pear/XML_RPC2 pear.phpqatools.org/phpqatools PHPDocumentor pear.phpunit.de/PHPUnit channel://pear.php.net/Text_Highlighter-0.7.1 channel://pear.phpundercontrol.org/phpUnderControl-0.6.1beta1 channel://pear.php.net/HTTP_Request2-2.0.0RC2 channel://pear.php.net/Net_URL2-0.3.1 pear.pdepend.org/PHP_Depend phpunit/PHP_CodeBrowser channel://pear.docblox-project.org/docblox-0.15.1 In the SSH window, run: sudo su In…

Running Jenkins CI for PHP on Amazon EC2 [3/7]

Continued from Signing up to Amazon EC2 and starting your first image Preparing PuTTY Note: These instructions are based on the Windows version of PuTTY and PuTTYgen Download an install PuTTY and PuTTYgen from http://www.chiark.greenend.org.uk/~sgtatham/putty/ (if there is an “install all” install for your platform, use that) Load PuTTYgen Click Load (“Load an existing private key file”) Select “Show all files (*.*)” in the “Load” box instead of the “PuTTY Private Key Files (*.ppk)” Select your Amazon EC2 Key (such as AmazonInstance.pem) Click Load You should receive the “Succesfully imported foreign key” message Click “Save private key” (select Yes to “Are you sure you want to save this key without a passphrase to protect it?”) Save the file somewhere save Continued in Connecting to Amazon EC2 using PuTTY

Running Jenkins CI for PHP on Amazon EC2 [2/7]

Continued from Part 1 – Introduction Signing up to Amazon EC2 and starting your first image Sign up to Amazon’s AWS service at http://aws.amazon.com You will be prompted for payment details, but you won’t be charged if you use Amazon’s free Micro EC2 instance Wait for your account to be created – you will get an email once done, but it’ll take a few hours (it took me 3 hours) Log back into http://aws.amazon.com and select “Amazon EC2” Select the closest region to yourself in the left hand side Select “Launch instance” and, if prompted, select “Launch classic wizard” Select, from the Quck Start tab, the “Basic 64 Bit Amazon Linux AMI” image. This should be near the top and indicated with a big gold star to indicate “Free tier eligible if used with a micro instance”. Click continue Set the number of instances to 1 and the Instance type to “Micro”. Under “Launch instances”, select an EC2 availability zone or just leave it set to “No preference”. Click continue. Ignore the “Advanced instance options” and just click continue Ignore the Tags page and just click continue Select “Create a new Key Pair” and give it a name (such as…