The OpenStack Deployment Plugin enables packaging multi-rpm products, and deploying these products on an Openstack environment
The plugin assumes the following:
- Product components are packaged as RPMs
- Product artifacts are uploaded to Nexus
- Artifacts which are not in Nexus can be retrieved via http
- Heat templates exist in a git repository
- Deployment scripts exist in either a git repository or are attached as a tar.gz file to each artifact in Nexus
The Heat repository is expected to have this structure:
`-- <product name>
|-- <product name>.env.yaml
|-- <product name>.yaml
`-- <product name>.yaml.dependencies
|-- embedded yaml.yaml
|-- some bash.sh
|-- some other bash.sh
`-- some other bash.sh
For example - this is the structure of the demo heat template:
`-- demo
|-- demo.env.yaml
|-- demo.yaml
`-- demo.yaml.dependencies
|-- __stand_alone_external_instance.yaml
|-- check_installation.sh
|-- component_installation.sh
|-- general_user_data.sh
`-- vci-utility-scripts
The heat stack can be found in Sample HEAT template
Prior to adding create/deploy product/profile, you should set your Nexus server credentials in the Manage Jenkins / configure System page:
To package your product:
- Create a 'Freestyle' job
- Add a 'Create Product' step:
- Select group ID, artifact ID, and set git repository paths for your heat templates and deployment scripts Heat git repo is mandatory. Scripts and puppets repos are optional.
- Add dependent products, artifacts and external dependencies. External dependencies are resources which do not exist in Nexus. They should be accessible via http.
Once you build your product, 3 artifacts are uploaded to Nexus:
- POM file, describing your dependencies
- TAR file containing your heat templates, deployment scripts and external dependencies
- RPM containing your Puppet scripts (built from the Puppet git repo and from the puppet scripts tar uploaded with each component.
Now you can define a 'deploy' job to deploy the product you packaged in an OpenStack environment
- Create a free-style job
-
Mark job as 'parameterized' and define a string parameter named 'version'
-
Add a 'Deploy Product' built step
- Set product parameters and OpenStack credentials
- You may define product-specific parameters, and assign a value to common parameters
- A yum repository is required. The machine have a link pointing /var/www/html to /ci-repo. Jenkins will copy the artifacts to this yum repo. In order to accomplish this you will need to provide the proper SSH private key.