Integrating Codeship with Appranix
Continuous Deployments via Appranix using Codeship
About Appranix
Appranix simplifies and automates the entire application operations (Site Reliability Engineering) on cloud platforms using its app-centric, real-time, cognitive automation technology called ServiceFormation. Refer to the full set of Appranix platform capabilities at www.appranix.com/product/platform.html.
Similar to Codeship, ServiceFormation is a SaaS platform that is readily accessible and implemented for any distributed application bound to run on any private or public cloud platforms.
With Appranix Codeship integration, a Codeship user doesn’t have to worry about pushing the code to operations. Application operations teams (SREs) can confidently deploy, run and operate the code in production to achieve the Service Level Objectives.
Codeship Pro
Manual Integration
Integrating Codeship with Appranix is as simple as including the appranix.sh script file in your project repository.
Prerequisites
After adding appranix.sh to your project repository along with codeship-services.yml and codeship-steps.yml files add the following environment variables to your codeship-services.yml file. You can also encrypt the environment variables, for more info click here.
USER
- Username of your Appranix accountPASSWORD
- Password of your Appranix accountORG
- Organization in your Appranix accountSUBORG
- Sub Oraginization in your account where assembly is locatedASSEMBLY
- Name of the assembly where the AppSpace is locatedPLATFORM
- Name of the platform where the artifact component is locatedARTIFACT
- Specific name of the artifact component which should will deploy the latest buildAppSpace
- Name of the AppSpace where the artifact component is located
Appranix Setup
In your Appranix AppSpace where the latest build is to be integrated, the appVersion variable must be created in that platform and must be included in Version field of artifact component within that same platform.
- Add the appVersion variable in your Appranix platform.
2. Add the appVersion variable in Version field of the artifact component.
When a new build is completed the build number is stored in the CI_BUILD_NUMBER environment variable, this build number is then updated in Appranix within the appVersion variable and the artifact component pulls the artifat with that build number.
Configuring Deployments
In codeship-steps.yml file, after the step where the artifact is deployed to your artifactory server add another step at the end to execute the appranix.sh file. For eg,
- name: artifact deployment
tag: master
service: app
tag: master
service: app
command: mvn package
command: mvn deploy
- name: Appranix deployment
tag: master
service: app
command: sh appranix.sh
Note: The container must have Ruby version 2.3.3 or higher for the ‘appranix.sh’ file to execute the required gem.
Appranix’s Kubernetes-as-a-service
Appranix can run and operate Codeship built docker images on Kubernetes container orchestration system. Appranix manages the entire Kubernetes system including deployment, cloud infrastructure provisioning, configuration management, monitoring, self-healing of the Master nodes or kube nodes.
Codeship Basic
Manual Integration
Include the appranix.sh script file in your project repository.
Prerequisites
After adding appranix.sh to your project repository add the following values in the Environment page of your Codeship Project Settings, for more info click here.
USER
- Username of your Appranix accountPASSWORD
- Password of your Appranix accountORG
- Organization in your Appranix accountSUBORG
- Sub Oraginization in your account where assembly is locatedASSEMBLY
- Name of the assembly where the AppSpace is locatedPLATFORM
- Name of the platform where the artifact component is locatedARTIFACT
- Specific name of the artifact component which should will deploy the latest buildAppSpace
- Name of the AppSpace where the artifact component is located
Appranix Setup
- Add the appVersion variable in your Appranix platform.
2. Add the appVersion variable in Version field of the artifact component.
Configuring Deployments
In the Deploy section of your Codeship Project Settings configure all your settings to deploy the artifact to your artifactory repository.
After that add sh appranix.sh at the end. The script file will connect to Appranix and trigger deployment for the new build. For eg,
#Deployment to artifactory repository
mvn package
mvn deploy
#Appranix deployment
sh appranix.sh
Note: Make sure you have selected Ruby version 2.3.3 or higher. It can be done by adding `rvm use 2.3.3` to Deploy Configuration of your Codeship Project Settings.
Integration Video
Here is a simple video on how the Appranix integration with Codeship Basic works.
Need More Help?
Get in touch if you need more help at info@appranix.com