Coder Social home page Coder Social logo

devgrok / container-storage-setup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from projectatomic/container-storage-setup

0.0 1.0 0.0 482 KB

Service to set up storage for Docker and other container systems

License: Apache License 2.0

Makefile 1.07% Roff 6.58% Shell 92.35%

container-storage-setup's Introduction

Container Storage Setup

Tool for setting up container runtimes storage

container-storage-setup is part of the Project Atomic suite of container projects, formerly known as docker-storage-setup.

A crucial aspect to container runtimes is the concept of the copy-on-write (COW) layered filesystems. The Docker Engine Storage docs site explains how the docker daemon uses uses COW file systems

container-storage-setup is a script to configure COW File systems like devicemapper and overlayfs. It is usually run via a systemd service. For example docker-storage-setup.service, runs container-storage-setup before the docker.service script starts the docker daemon.

The container-storage-service script takes an input file and an output file as parameters. The input file is usually provided by the distribution and is expected to be modified by administrators. The script generates the specified output file as a configuration file bash script which sets environment variables to be used by the container runtime service script.

For example if I configured an runtime-storage-setup to look like

cat /etc/sysconfig/runtime-storage-setup 
STORAGE_DRIVER="overlay2"

If I then executed

container-storage-setup /etc/sysconfig/runtime-storage-setup  /etc/sysconfig/runtime-storage

I will end up with a runtime storage file which looks like.

cat /etc/sysconfig/runtime-storage
STORAGE_OPTIONS="--storage-driver overlay2 "

The service script of the container runtime should have something like

EnvironmentFile=-/etc/sysconfig/runtime-storage
...
ExecStart=/usr/bin/container-runtime $STORAGE_OPTIONS
...

Obviously the container runtime must handle the --storage-driver option.

NOTE: container-storage-setup has legacy support for docker-storage-setup. If you execute the script without specifying an input file and and output file, it will default to an input file of /etc/sysconfig/docker-storage-setup and an output file of /etc/sysconfig/docker-storage. The Environment name in the output file will be set to DOCKER_STORAGE_OPTIONS.

cat /etc/sysconfig/docker-storage-setup 
STORAGE_DRIVER="overlay2"

If I then executed

container-storage-setup

I will end up with a runtime storage file which looks like.

cat /etc/sysconfig/docker-storage
DOCKER_STORAGE_OPTIONS="--storage-driver overlay2 "

Input File

The input file should be setup by distributions or by the packagers of the container runtimes. The contents can also be set during system bootstrap, e.g. in a cloud-init bootcmd: hook, or via kickstart %post.

For more information on configuration, see man container-storage-setup.

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.