- The purpose of this repo is to house a container that runs a simple NodeJS application in order to display a nice, simple UI showing the latest deployed DockerHub tags per stack / container in each respective environment you've created in your Rancher cluster.
- The NodeJS simply executes a shell script (
data.sh
), and serves up a dynamically generated index page (index.html
). - This container must run in rancher in order for the
curl
calls against the Rancher metadata API to work. - This is important, because it allows to get a high-level view of currently deployed docker tags for each respective stack.
-
This job requires that the container runs in a Rancher environment in order to access the Rancher-Metadata API.
-
Containers that wish to use the status page must implement the
stack.name
label in their rancher-compose: -
Be sure to export DOCKER_TAG for your desired docker tag from DockerHub prior to submitting rancher-compose.yml.
labels: io.rancher.container.dns: "true" io.rancher.stack.name: "srflaxu40/rancher_status_page:${DOCKER_TAG}"
-
To use the rancher-metadata API, you must enable the following label in your container's rancher-compose file:
io.rancher.container.dns: true
docker build --no-cache -t rancher-status-page
docker-compose -f docker-compose.yml up -d web
source rancher_env.sh
rancher-compose --verbose -f rancher-compose.yml -p rancher-status up --upgrade --confirm-upgrade --pull -d
- After running the above command, go to port 20040 of your rancher instance or host, and see what tags you have deployed for each stack / container.