Coder Social home page Coder Social logo

jlleitschuh / jenkinsci__openshift-deployer-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/openshift-deployer-plugin

0.0 2.0 0.0 8.84 MB

OpenShift plugin enables Jenkins job to create containers(gears) on OpenShift and deploy applications to it

License: Apache License 2.0

Java 94.74% HTML 5.26%

jenkinsci__openshift-deployer-plugin's Introduction

OpenShift Deployer Plugin

OpenShift Deployer Plugin enables Jenkins job to create containers(gears) on OpenShift and deploy applications to it. This plugin currently supports OpenShift v2.

Installing

This plugin is available in the Jenkins plugin manager. To install in Jenkins, go to Manage Jenkins | Manage Plugins | Available | OpenShift Deployer Plugin | Install.

You must restart Jenkins to complete the installation.

Configuration

SSH keys are essential when working with OpenShift. SSH keys must be uploaded to the OpenShift server in order for this Jenkins plugin to be able to deploy to OpenShift.

If no SSH keys exist on the Jenkins server, follow these instructions to generate a pair:

ssh-keygen -t rsa -f /var/lib/jenkins/.ssh/id_rsa
chmod 755 /var/lib/jenkins/.ssh/
chmod 644 /var/lib/jenkins/.ssh/authorized_keys

In order to configure the OpenShift Deployer plugin, go to Manage Jenkins | Configure System | OpenShift. Enter the path to the public key (defaults to /var/lib/jenkins/.ssh/id_rsa.pub).

Add an OpenShift Server block for each OpenShift server you want to deploy to by specifying an arbitrary name, broker address, username and password. Click on "Check Login" to test the authentication. If successful, you can upload your SSH Public Key to the OpenShift server by clicking on "Upload SSH Keys". The broker address is by default openshift.redhat.com which is the address of broker for http://www.openshift.com.

Build Steps

The Deploy Application build-step creates a container on OpenShift and deploys the WAR, EAR or TAR archive package to the created container. It also supports giving a URL (e.g. to Nexus or Artifactory) for the deployment which will be fetched and deployed to OpenShift. This buildstep supports both git and binary deployments.

When building the WAR/EAR file by Maven, make sure your build is successful creating a deployable file. The mvn package command creates the WAR/EAR file into its target directory. Otherwise create the WAR/EAR in whatever way that is appropriate for you project. Check out this blog post for further details on creating TAR archives for binary deployment.

After the WAR/EAR/TAR is created, add a Deploy to OpenShift build-step in your Jenkins job configuration and specify the OpenShift server from the list of added servers, application name, domain and cartridges for the OpenShift gear. It is also possible to choose the gear profile and the path to the WAR/EAR/TAR directory (defaults to target) or alternatively the URL to the WAR/EAR/TAR file.

The Delete Application build-step deletes an existing application from OpenShift.

Building & Installing from Source

  1. Follow instructions on setting up your environment from Jenkins

  2. Build the plugin:

    git clone https://github.com/jenkinsci/openshift-deployer-plugin.git
    mvn clean package
    
  3. This will create a *.hpi file in the target directory.

  4. On your Jenkins instance, go to Manage Jenkins | Manage Plugins | Advanced | Upload Plugin.

  5. Choose the generated *.hpi file and click upload.

  6. Restart Jenkins.

TODO

Moved to JIRA

jenkinsci__openshift-deployer-plugin's People

Contributors

enham avatar juhoffma avatar siamaksade avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.