项目作者: MetaBarj0

项目描述 :
Composable Autonomous and Simple Environment Builder
高级语言: Shell
项目地址: git://github.com/MetaBarj0/carrier.git
创建时间: 2017-09-13T16:35:33Z
项目社区:https://github.com/MetaBarj0/carrier

开源协议:MIT License

下载


carrier

Overview

Is a sandbox environment and appliance fabricator. It mainly relies on the
docker technology therefore, any environment that can natively use docker
should be able to use carrier.
However, carrier can also be used on environment that cannot use docker
natively. To operate, Vagrant is used alongside Virtualbox (as a provider)
to provide a valid docker environment (based on archlinux). This installation
provides a pre-configured docker host and docker-compose.
carrier can be seen as a solution to facilitate :

  • docker image building process
  • docker image composition
  • docker image reusability
  • docker appliance building
  • docker appliance execution
  • docker appliance persistant storage management (yet to come)

To summarize :

  1. +-----------------------------------------------------------+
  2. | carrier |
  3. +-----------------------------------------------------------+
  4. | |
  5. | +--------+ } related to image |
  6. | | docker | } building, composition |
  7. | +--------+ } and reusability |
  8. | | images | |
  9. | | | |
  10. | | +----+-----------+ } related to appliance build and |
  11. | | | docker-compose | } management as well as containers |
  12. | +---+----------------+ } persistent storages |
  13. | | volumes | |
  14. | | | |
  15. | +----------------+ |
  16. | |
  17. +-----------------------------------------------------------+

Note for users

carrier is under heavy development. It means that several drastic changes
could occur in short period of time leading for instance to a whole
re-architecture of folders, complete rewriting of scripts and spurious feature
changes.

A word on Vagrant and Virtualbox provider

One can choose to use the provided Vagrant oriented facilities to use
carrier. The provided vagrant box is a minimalist Archlinux installation
with a particular partition layout. By the way, except for the /boot mount
point, all partitions are LVM2 based. Using LVM2 ensure a good
scaleability for each related partitions as it allows one to extend volume
groups (system and docker-related) as well as resize up logical volumes (for
instance, one can size up the logical volume used to store docker persistent
volumes).

Designed mount points

  • /boot : vfat type, EFI, really small, (64 MB)
  • / : LVM2, extendable, (4GB)
  • /var/lib/docker : LVM2, extendable, noexec, nodev, nosuid, (8GB)
  • /var/lib/docker/volumes : LVM2, extendable, nosuid, (8GB)

Vagrant shared folders

  • /vagrant : classical shared folder created by Vagrant itself
  • /docker : added mount point pointing on the docker directory of the carrier
    repository, to facilitate carrier‘s scripts usage from within the VM.

Usage

Creating the working environment using Vagrant facilities

This section describes how to use the Vagrant environment provided with the
carrier repository. It is not a mandatory step unless you’re working on a
platform that does not support docker and docker-compose natively.
On the other hand, VirtualBox (5.2.12+) and Vagrant (2.0.3+) are needed.

Setup

Go to the vagrant/Box4Docker directory. You’ll find a Vagrantfile describing
the box.
A simple vagrant up should does the job and create a viable environment to
work with.
vagrant ssh will allow you to enter the environment’s shell and begin to work
with carrier.
As stated above, a /docker mount point is linked to the docker/ directory of
the carrier repository and ease the carrier‘s scripts usage.

Working on existing docker host

Preprequisite : be on an environment where docker and docker-compose are
supported and installed.