Improves redmine wikis adding Rancher, GitHub and DockerHub links. The image is created under the name: eeacms/redmine-wikiman
- RANCHER_CONFIG - Rancher configuration, Multiline, with the format - rancher url, access key, secret key ( separated by commas)
- WIKI_SERVER - Redmine url - The main url of the redmine instance.
- WIKI_APIKEY - Redmine API key - Belongs to the user that will update the wiki pages.
- WIKI_PROJECT - Redmine wiki project, the redmine project where the wiki pages are.
- WIKI_HOSTS_PAGE - Redmine wiki hosts page
- WIKI_STACKS_PAGE - Redmine wiki stacks page
- WIKI_CONTAINERS_PAGE - Redmine wiki containers page
- WIKI_PAGE - Redmine wiki with applications
- SVN_USER - SVN user to read docker-compose.yml
- SVN_PASSWORD - SVN password to read docker-compose.yml
- GITHUB_TOKEN - can be given to avoid API number of requests per IP restrictions
- DEBUG - Set to "Yes" to enable debug logging
- DOCKERHUB_USER - user used to interogate image builds on dockerhub
- DOCKERHUB_PASS - password for the previously defined user
docker run --rm -e RANCHER_CONFIG="RANCHER-URL,RANCHER-ACCESS-KEY,RANCHER-SECRET-KEY" eeacms/redmine-wikiman
docker run --rm -e RANCHER_CONFIG="RANCHER-URL,RANCHER-ACCESS-KEY,RANCHER-SECRET-KEY RANCHER2-URL,RANCHER2-ACCESS-KEY,RANCHER2-SECRET-KEY" -e WIKI_SERVER="REDMINE_URL" -e WIKI_APIKEY="REDMINE-KEY" -e WIKI_PROJECT=project -e WIKI_HOSTS_PAGE=RancherHosts -e WIKI_STACKS_PAGE=RancherStacks -e WIKI_CONTAINERS_PAGE=RancherContainers -e DOCKERHUB_USER=user -e DOCKERHUB_PASS=password eeacms/redmine-wikiman
The scripts can be run in python, with the following arguments:
- -v - debug logging
- -n - wiki is not uploaded to redmine
For example: python /listcontainers.py -v -n
Updates a redmine wiki page with the list of current docker containers per rancher environment ( including image, stack, status), calculating memory reservation and limit per host/environment/rancher and comparing it with the real memory values.
Updates a redmine wiki page with the list of current hosts per rancher environment ( including check_mk link, docker version, OS version), calculating available and used memory percentages.
Updates a redmine wiki page with the list of current rancher stacks per environment ( including date created, state and health, catalog, description and tags ).
Updates all wiki subpages for a redmine wiki page, searching for "DeploymentRepoURL" url and extracting docker image information ( docker hub link and github link ) and adding and populating "Source code information" section of the wiki with it.
Updates all factsheet wiki subpages to match the factsheet template. It adds missing mandatory fields and sections, reorders the existing ones, and generates a report grouped by product owner.
The script can detect alternate section titles and normalize them to match the title in the template. This is especially useful when changing a title in the template. Specify them as *Alternate titles* : title one; title two
(a list delimited by ;
).
Updates all wiki subpages for a redmine wiki page, searching for "Service location" link and extracting it from the current rancher stacks list (created by liststacks.py) and adding the stack link in the field "Rancher Stack URL" to it.
To make the development easier, you can mount the scripts in a volume and run them:
docker run -v $(pwd)/src:/src -e RANCHER_CONFIG="RANCHER-URL,RANCHER-ACCESS-KEY,RANCHER-SECRET-KEY RANCHER2-URL,RANCHER2-ACCESS-KEY,RANCHER2-SECRET-KEY" -e WIKI_SERVER="REDMINE_URL" -e WIKI_APIKEY="REDMINE-KEY" -e WIKI_PROJECT=project -e WIKI_HOSTS_PAGE=RancherHosts -e WIKI_STACKS_PAGE=RancherStacks -e WIKI_CONTAINERS_PAGE=RancherContainers eeacms/rancher2redmine sh
$python /src/listcontainers.py -v