Coder Social home page Coder Social logo

ch3ll / barnacle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cachedout/barnacle

0.0 2.0 0.0 115 KB

Dockerfiles to easily create environments for developing and testing SaltStack on various platforms.

License: Apache License 2.0

Shell 100.00%

barnacle's Introduction

barnacle

Docker files for SaltStack

Note: It is strongly recommended that the default storage engine for Docker not be set to use the loopback/devicemapper. This will result in very slow builds and poor performance. Choose overlay or overlay2 if possible.

TL;DR (Lazy version)

For the impatient, images are available on Docker Hub.

To pull images: docker pull cachedout/barnacle

To use them, replace the name of the containers in the examples below with the path to the image tag. For example, replace instances of salt-arch with cachedout/barnacle:arch.

Installation

The following steps will walk you through building and running a Docker image for Arch Linux.

To build and test another OS, simply change the OS identifier where appropriate.

NOTE: This guide assumes that one's local salt development directory is in ~/devel/salt. If this is not the case, adjust the paths below accordingly.

To build an image, change to an image directory and type: sudo docker build -t salt-arch.

This will download a base image and apply the necessary layers to ensure it has all the layer necessary to develop Salt with, including all of the development deps.

After the container is built, you can shell into it and have a look around:

udo /usr/bin/docker run --rm -itv ~/devel/salt/:/testing salt-arch /bin/bash

Your local Salt development directory will be mounted into /testing. Any change you make locally will be immediatley reflected there and vice-versa.

You can of course run the tests if you like: python2 /testing/tests/runtests.py

Running the tests and then exiting

There is no need to create a shell just to run a test. You can do this with one command:

sudo /usr/bin/docker run --rm -itv ~/devel/salt:/testing salt-arch python2 /testing/tests/runtests.py

Again, this will operate on your local checkout of the Salt repo so you can quickly make changes and then immediatley see how they will work on any given platform.

Using .zsh aliases

This repo includes a docker_salt.zsh file. It makes running things even easier. Importing it into your shell is an exercise for the reader. ;]

To run a single test:

cts arch integration.modules.beacons <-- Runs the becaons tests in an Arch container

cshell arch <-- Gives you a shell in an Arch container

barnacle's People

Watchers

 avatar  avatar

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.