Git Product home page Git Product logo

rancher-status's Introduction

Rancher-Status-Page:

  • 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.

Notes:

  • 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
    

Build:

  • docker build --no-cache -t rancher-status-page

Run (this won't hit the Rancher-metadata API):

  • docker-compose -f docker-compose.yml up -d web

Run in rancher (requires changing values in rancher_env.sh:

  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.