Sneha Tilak My SGA diaries...

Assignment 1 and 2

Team Members:


Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

Continuous Deployment (CD) is an extension of continuous integration, aiming at minimizing lead time, the time elapsed between development writing one new line of code and this new code being used by live users, in production.

Theme 1 concentrates on implementing Load Balancing among multiple Laravel Portals across Amazon spot instances. We have used HAProxy to provide a high availability load balancer and proxy server that spreads requests across multiple servers. Memcached is used as a distributed memory caching system to manage sessions and secure the system. The version control mechanism used is Git and we have made the portal easily deployable by implementing Continuous Integration and Continuous deployment.


Mechanism:

Theme1.jpg

Note: Image from Source


Problem Statement:

We need to make the code easily deploy-able by having a build and make it IDE and developer friendly.


Possible Solutions:

I delved into some possible solutions for the problem statement and concluded the following -

Continuous Integration -

Feature Source
Travis-CI travis-ci.org
Jenkins jenkins.io

Continuous Deployment -

Feature Source
Amazon AWS aws.amazon.com

Solution Evaluation:

Continuous Integration

Travis-ci and Jenkins, while both are tools for continuous integration are very different. Travis is a hosted service (free for open source) while you have to host, install and configure Jenkins.

Travis does not have jobs as in Jenkins. The commands to run to test the code are taken from a file named .travis.yml which sits along your project code. This makes it easy to have different test code per branch since each branch can have its own version of the .travis.yml file.

Depending on where the code repository is hosted we can make the following choices:

Travis CI vs Jenkins:

Setting up CI for a project:

Travis: Very easy to setup with a Github account.

Jenkins:

Re-run the builds:

Travis: Every push made on the Github repository triggers a build.

Jenkins: Provide phrase text in PR/commit description like “reverify jenkins”.

Controlling environment:

Travis: Travis provides hosted environment. It installs required softwares for every build is a time consuming process.

Jenkins: It’s a onetime setup. It installs all the required softwares in node/slave machine and perform all the tests on pre-installed environment.

Build Logs:

Travis: Supports build logs to place in Amazon S3.

Jenkins: Easy to setup with build artifacts plugin.

###Continuous Deployment Amazon AWS: AWS provides a low-cost, scalable and highly reliable infrastructure platform in the cloud. AWS services include:

Advantages of AWS:


Conclusion:

We are going ahead with the following:

In the future milestones, depending on the environment, there is scope to experiment with other options like Jenkins, Opensource, Kubernetes, etc.

Steps:

Note - The installation scripts are self explanatory with comments.


Associated Github issues: