Git Product home page Git Product logo

raspi-stacks's Introduction

raspi-stacks

Docker stack configurations for my Raspberry Pi

Setting it up

To get this up and running on a Raspberry Pi:

Build & deploy stacks initially

  1. Install Docker
    curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
    
  2. Have your GitHub SSH keys set up under /home/pi/.ssh (so they would be mounted to Jenkins)
  3. Copy or git clone the repository on the Raspberry Pi
  4. Run dockerfiles/build.sh and stacks/deploy.sh to get all stacks up and running

Configure Jenkins

  1. Wait for Jenkins to start running in port 8081
  2. Read Jenkins initial admin password from inside the container
    docker exec -ti [container name or id] cat /var/jenkins_home/secrets/initialAdminPassword
    
  3. Set Jenkins up in a browser with the password
  4. Add a new pipeline project
  5. Select "Pipeline script from SCM" and add your repository URL
  6. Make sure that the script path is Jenkinsfile
  7. Check "Poll SCM" in build triggers with the desired cron schedule, e.g.:
    • Every 5 minutes: H/5 * * * *
    • Every minute: * * * * *

Now Jenkins should be all set up and polling for changes in your repository's master branch!

Using it

Just develop all your custom Docker images under dockerfiles directory. Each directory under it defines a custom image. Whenever a new directory appears there, it will be built by Jenkins and pushed into the local registry running in devops stack.

When you want to deploy any images (custom or existing), add them to an existing stack or create a new one under stacks directory. Each directory under it defines a Docker stack. After build stage, Jenkins deploys all defined stacks on the Raspberry Pi.

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.