An open API service indexing awesome lists of open source software.

https://github.com/crowdcode-de/rancher-maven-plugin

Update the rancher via maven-plugin
https://github.com/crowdcode-de/rancher-maven-plugin

Last synced: 3 months ago
JSON representation

Update the rancher via maven-plugin

Awesome Lists containing this project

README

          

# Rancher API Maven plugin

A Maven plugin for interacting with [rancher](http://rancher.com). Basing on the sources from: https://github.com/RedFroggy/rancher-maven-plugin

## Goal
There is only one goal: stack-deploy which purpose is to delete and/or create
a new rancher stack thanks to a docker-compose file

## Usage
### pom.xml file
```

io.crowdcode.maven.plugins
rancher-maven-plugin
1.1.0

src/main/resources/docker-compose.yml
${ACCESS_KEY}
${PASSWORD}
false
http://${HOST}/v2-beta
Default

src/main/resources/docker-compose.yml
Stackname
Stackdiscriptions
remove,wait:millis,create,verify[:timeout[:attempts]]

```
### Command line
All optons can be overidden by using line arguments:
```
- rancher.accessKey # rancher login
- rancher.password # rancher password
- rancher.url #rancher url (should be http://HOST)(v2-beta will be used)
- rancher.environment # environment
- rancher.skip # enable or disable plugin. Default enable
- rancher.stack.name # Name of the stack to delete/create
- rancher.stack.description # Stack description
- rancher.stack.startOnCreate
- rancher.stack.dockerComposeFile # docker-compose file
- rancher.stack.rancherComposeFile # rancher-compose file
- rancher.stack.actions # actions witch has to do (remove/create/wait:time/verify[:timeout[:attempts]])
```

Examples:
```
mvn rancher:stack-deploy -Drancher.accessKey=XXXX -Drancher.password=YYYYY -D.....
```

### skip:
If set to true disables creating a Stack. This config option is best used together with a maven property

## Tests
```
mvn clean test
```

## Nice to have
- Convert current unit tests into integration tests because it needs
infrastructure (Rancher).
- Check maven parameter provided by user.
- More Debug-Logging.
- Better exception handling.
- Update stacks.
- Update single services in a stack.