Skip to content

8x8Cloud/Chefless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chefless

A tool to make minimailzed Docker images using Chef. This repo depends on Docker and the Chef Development Kit.

How does it work?

To get started, clone this repo:

> git clone [email protected]:8x8Cloud/Chefless.git

Then, run config.sh with the following arguments:

Usage: ./config.sh -g GIT_URL -s SERVICE -r ROLE [-b BRANCH] [-i IMAGE] [-e ENVIRONMENT] [-p PATH] [-h]
-g | --git:          The URL of a git repository which holds Chef configuration data. Required.
-s | --service:      The service that the image will create and run. Required.
-r | --role:         A Chef role included in the given git repository. Required.
-b | --branch:       A branch of the given git repository. Optional. Defaults to 'develop'.
-i | --image:        The desired name of the Docker image to be created. Optional. Defaults to SERVICE-ENVIRONMENT-BRANCH.
-e | --environment:  A Chef environment included in the given git repository. Optional. Defaults to 'development'.
-p | --path:         The path relative to the environments folder containing the given environment file. Optional. Defaults to 'development'.
-h | --help:         Prints a help message and exits. Optional.

Note that config.sh will skip pulling the given repository if a directory already exists with the same name. Next, run go.sh. This will configure a Docker image with either an image name passed into config.sh, or with the default image name it generates if no name was given. If you wish to change the name of the image after the run finishes, you can tag it with the name you want to use.

Once an image has been generated, you can optionally run cleanup.sh. This will remove all files generated by config.sh, including the git repository it pulled.

You can create a container from your image using docker run. Kitematic, which comes standard with Docker Toolbox, is another useful tool for inspecting and managing containers.

Why should I use this?

This setup provides the full ability to configure a container using Chef without having to install Chef or any of the systems that Chef needs. This lets you create a more lightweight container with minimal bloat.

Dependencies

What do I do if something breaks?

If you're running into a bug, please file an issue on our tracker.

License

Apache 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages