From d55dc929457ef94621b2e7cd4b5c5cd60b3d6228 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sat, 27 Mar 2021 03:45:56 +0700 Subject: [PATCH] Simplify prerequisite with tools container --- README.md | 12 ++++-------- tools/Dockerfile | 3 ++- tools/docker-compose.yaml | 3 ++- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 193893b2..d8b52265 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,7 @@ For the controller (to run Ansible, stateless PXE server, Terraform...): - SSH keys in `~/.ssh/{id_rsa,id_rsa.pub}` -- `make` -- `python3` - Docker with `host` networking driver (which means [only Docker on Linux hosts](https://docs.docker.com/network/host/)) -- `terraform` (0.14.x) - `vagrant` (optional, to create a local [test environment](./test)) For bare metal nodes: @@ -48,19 +45,18 @@ For bare metal nodes: ### Building -Simply run: +Open the tools container: ```sh make ``` -Or we can build each layer individually: +Then build each layer: ```sh +make metal make infra -# or -cd infra -make +make apps ``` ## Acknowledgments diff --git a/tools/Dockerfile b/tools/Dockerfile index 87d35a11..3133e33c 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -12,6 +12,7 @@ RUN apk add --no-cache \ RUN apk add --no-cache --repository "http://dl-cdn.alpinelinux.org/alpine/edge/testing" \ helm \ kubectl \ + lxd \ terraform -WORKDIR /root/src +WORKDIR /src diff --git a/tools/docker-compose.yaml b/tools/docker-compose.yaml index d8e08154..0187f457 100644 --- a/tools/docker-compose.yaml +++ b/tools/docker-compose.yaml @@ -4,5 +4,6 @@ services: tools: build: . volumes: - - ..:/root/src + - ..:/src + - $HOME:/root - /var/run/docker.sock:/var/run/docker.sock