We’re very excited to announce deployment support for OpenShift, RedHat’s platform-as-a-service solution.
OpenShift is RedHat’s auto-scaling PaaS for web applications. Similar to wercker, OpenShift allows developers to focus on their code and not the management of your stack and infrastructure. You can sign up for OpenShift, for free, here.
Wercker helps you streamline your continuous delivery pipeline to OpenShift, thus reducing risk and eliminating waste in your workflow and increasing developer velocity. Signing up for wercker is easy and free, so go ahead. Alongside integrating with OpenShift, Wercker is now also a developer partner.
Getting started with Wercker and OpenShift
In this post we’re outlining how to get started with wercker and OpenShift. For your convenience, we’ve created a sample application in Ruby on GitHub that you can fork to get started with OpenShift and wercker. OpenShift offers several application quickstarts that you can view here. Keep in mind, that wercker currently supports Node.js, Ruby and Python, but more stacks are coming soon!
This guide is also available in short form on our dev center.
- OpenShift credentials (sign up at OpenShift registration page)
- You have created an application in OpenShift
- A GitHub or Bitbucket account with a pre-made repository
- You have registered for a wercker account and signed in
- You have added your application to wercker
In this article we will add one for OpenShift. Follow along with the steps below:
Navigate to your application
First we need to sign in at wercker and navigate to the application we like to deploy to OpenShift.
Add OpenShift deploy target
To start the process to add an OpenShift deployment target, do the following:
- Click on the
Deploymenttab to open it
- Click the
Add deploy targetdropdown
Create OpenShift authentication token
note: you can skip this step if you already have an OpenShift authentication token.
OpenShift allows other services, like wercker, to access information via a secret token. OpenShift has three different scopes:
userinfo. Wercker needs only read access. Although you can use an existing authentication token we strongly advice to create one per service. You can create a
readauthorization key at the add authorization page at OpenShift. Give it a meaningful name like
Enter the OpenShift authorization token and click
Enter OpenShift deploy target details
Enter a descriptive deploy target name, such as: staging or production.
Select the OpenShift domain and application that you want to deploy to. Wercker automaticly selected the first available domain and application.
If there are no domains or applications listed, please make sure you’ve created them on OpenShift.
save to create the deploy target.
note: you can learn more about OpenShift domains and application in the Namespaces chapter of the OpenShift User Guide.
Add public key to OpenShift
Wercker generates a ssh key per deploy target which is used to securely encrypt the connection that is used to deploy to OpenShift. This key needs be added to the public keys section at OpenShift.
Copy the full content of the public key from the second textbox.
Login to OpenShift and add the key to your public key list.
You are now ready to deploy to OpenShift. Wercker allows you to deploy all succesfull builds. Navigate to your application and select the succesfull build you like to deploy.
In the build via click the
deploy this build button and choice the target that you have just create.
Congratulations! You have succesfully deployed your application to OpenShift.
You can share the build status of your application via the wercker badge (for instance in the README.md of your application on GitHub), that you can add via the ‘share button’, just below the application header:
This is the build status of my application on wercker:
If you want to invite team members to your application, you can do so via the settings tab. Keep in mind that the team members you want to invite have to have a wercker account (sign up here).
Thanks for following along and view my final application on wercker here