Skip to content

jgcc97/chef-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Chef-Training

With Chef you can automatize the creation of your environment with simples scripts.

Installation

First you need to install Docker and Docker Compose.

How to Install Docker

  1. Update the apt package index:
sudo apt-get update
  1. Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
  1. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

sudo apt-key fingerprint 0EBFCD88
  1. Add the repository
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
  1. Install Docker CE
sudo apt-get install docker-ce

How to Install Docker Compose

  1. Check the current release and if necessary, update it in the command below:
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
  1. Set the permissions:
sudo chmod +x /usr/local/bin/docker-compose
  1. Verify that the installation was successful by checking the version:
docker-compose --version

Set up the environment

First you need to create a directory

mkdir chef-training

And, move into the directory

cd ~/try-chef

Get the Docker Compose file.

wget https://raw.githubusercontent.com/learn-chef/chef/master/docker-compose.yml

Next, run the following docker-compose command to retrieve the latest workstation images.

docker-compose pull

Next, run the following docker-compose command to start the containers. The -d argument starts the containers in the background.

docker-compose up -d

Now, start an interactive Bash session on the workstation container.

docker exec -it workstation bash

About

Here I practice chef

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published