Skip to content

xebialabs-community/xld-rancher-plugin

Repository files navigation

XL Deploy Rancher plugin

Build Status License: MIT Github All Releases Codacy Badge Maintainability

Preface

This document describes the functionality provided by the XL Deploy Rancher plugin.

See the XL Deploy reference manual for background information on XL Deploy and deployment automation concepts.

Overview

This XL Deploy plugin creates and upgrades Rancher stacks.

Requirements

  • XL Deploy 6.0+

Installation

  • Copy the latest JAR file from the releases page into the XL_DEPLOY_SERVER/plugins directory.
  • Restart the XL Deploy server.

Usage

Configure the CLI interface

Set up a rancher.RancherCliClient object with Rancher server URL, access key, and secret key. This object can be located under an overthere.Host object.

Screenshot of RancherCliClient

Configure the REST interface

As an alternative to the CLI, you can define a rancher.RancherRestClient object in the Infrastructure tree. It can be located under the root node or any folder. Set the host (DNS or IP), port, access key, and secret key.

Screenshot of RancherRestClient

Configure the Rancher Compose Archive

To configure a rancher.CliComposeArchive or rancher.RestComposeArchive object for deployment:

  • Create a docker-compose.yml file and a rancher-compose.yml file.

  • Zip them into a single archive to be used as the artifact.

  • Specify the project id or name.

  • Specify the stack name.

  • Enter the names of the services that should be upgraded under a MODIFY or NOOP deployment.

  • Set the force-upgrade and confirm-upgrade booleans for CLI upgrades.

  • Set the uniqueMatchOnly flag to true for REST deployments if the deployment should abort on multiple matches for the project and/or stack names.

Screenshot of CLI Compose Archive

Screenshot of REST Compose Archive

Deploying

Deploy the rancher.ComposeArtifact to the rancher.RancherCliClient or to the rancher.RancherRestClient in order to create, update, upgrade, or delete the corresponding object on Rancher.

Mapping of XL Deploy actions to Rancher actions

CLI

  • CREATE -- implemented to create a stack

  • MODIFY/NOOP -- implemented to upgrade the listed services

  • DESTROY -- implemented to remove a stack

REST

  • CREATE -- implemented to create a stack

  • MODIFY/NOOP -- implemented to upgrade the listed services

  • DESTROY