Using CodeShip With CodeDeploy
CodeShip is a hosted continuous delivery service that focuses on speed, simplicity and reliability. CodeDeploy is used for automatic application deployments.
Join the DZone community and get the full member experience.Join For Free
What is CodeShip?
CodeShip is a hosted continuous delivery service that focuses on speed, simplicity, and reliability. It is a fast and secure hosted CI service that scales as per users' needs. CodeShip was founded in 2011, and pretty soon it became one of the best Saas Continuous Integration and Continuous Delivery leaders in the market.
CodeShip is now backed by a larger company with extensive customer support: CloudBees. CloudBees Inc, the hub of enterprise Jenkins and DevOps, acquired CodeShip on February 6, 2018.
CodeShip comes in two flavors:
- CloudBees CodeShip Basic
- CloudBees CodeShip Pro
CodeShip can provide high speed—every time we run a build on CodeShip, it stores the dependency packages as caches for future runs. Thus, it reduces the amount of time required to run each future build.
In terms of reliability, CodeShip is very secure. It maintains security on the VMs. It is a fast and secure CI service that basically scales with our needs. With the increased number and size of builds, it handles the scalability factor on its own. It is responsible for increasing the resource limits like CPU, memory, etc, whenever there is an increase in the load; the number of commits, and thus, the number of builds increases.
Differences Between Basic and Pro
|CodeShip Basic||CodeShip Pro|
|Works out of the box||Has native docker support|
|Pre-installed CI dependencies||Fully customizable CI environment|
|One-click app integrations||Local build runner for test consistency|
CodeShip Pro has native docker support. This means that every time there will be an upgraded stable version of Docker available, CodeShip Pro will automatically use the latest stable version for running the builds. CodeShip Basic does not support containerization.
The Basic version offers a simple and decent UI to configure the CI dependencies. On the other hand, with CodeShip Pro, we get the complete docker support to ensure the resources which will be required by the services being deployed can be customized as per our needs.
CodeShip Pro works on a single-tenant AWS instance, providing us the full control of the instance resources and the limits to them. But, this is not the case with CodeShip Basic.
- Security: For every project that is added to CodeShip, a unique SSH key is created. This key, in itself, is strongly encrypted and is only decrypted shortly before being used in the build virtual machine.
- All communication with the build virtual machines can only be done via SSH.
- It supports a variety of programming languages (Ruby on Rails, Node.js, PHP, Java, Go, Dart, etc.) and deployment platforms (Amazon Web Services, Heroku, Google App Engine, etc.)
- Parallel test pipelines feature speeds up the builds.
Features of CodeShip
- Faster builds
- Always reliable
- Simple and easy to use.
- Builds run on pre-configured machines.
Introduction To CodeDeploy
CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances, serverless Lambda functions, or Amazon ECS services.
Features of CodeDeploy
AWS CodeDeploy eases the process of rapidly releasing new features. It helps in avoiding downtime during application deployment and handles the complexity of updating applications.
- Automated deployments
- Centralized control
- Minimized downtime
- Easy to adopt
- Helps rapidly release new features.
CodeDeploy can deploy application content that runs on a server and is stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. CodeDeploy can also deploy a server-less Lambda function.
Deployment Workflow (for an Amazon EC2 instance):
Importance of 'appspec.yml'
CodeDeploy uses an
appspec.yml file to define
application specification, in order to manage deployment.
The deployment logic data is stored in a file called
appspec.yml. The computing platform used indicates the structure of the
appspec.yml file. The structure of this file varies in terms of the environment used to deploy the application. Here, we will discuss the structure of this file w.r.t.
Amazon EC2 instances.
- Version: It defines the version of this
appspecfile. It is a mandatory field. One cannot edit it. Currently, the only allowed value is
- OS: This section specifies the operating system value of the instance to which we want to deploy. This is mandatory too. Currently, the only values supported are Linux and Windows.
- Files: It specifies the file names that will be copied to the AWS instance.
- Permissions: This section specifies how special permissions, if any, should be applied. They are applied to the files in the
filessection when they are copied over to the instance. It only applies to the Linux instances.
- Hooks: This section specifies commands/scripts to run at specific events during the deployment.
How To Set Up AWS CodeDeploy
In order to get started with AWS CodeDeploy, refer to the below diagram containing all the steps (click the image for an enlarged version).
What Are Deployment Configurations?
It indicates how many instances the application revisions should be simultaneously deployed, and it describes the success and failure conditions for the deployment.
How Do Rolling Updates Work?
- We can configure a deployment group to automatically roll back deployments when certain conditions are met. These conditions can include: when a deployment fails or an alarm monitoring threshold is met, etc.
- Can override the rollback settings, specified for a deployment group in an individual deployment.
- Can choose to roll back a failed deployment by manually redeploying a previously deployed revision.
Published at DZone with permission of Shivani Mehrotra. See the original article here.
Opinions expressed by DZone contributors are their own.