Simplify prerequisite with tools container

This commit is contained in:
Khue Doan 2021-03-27 03:45:56 +07:00
parent d2472f5fff
commit d55dc92945
3 changed files with 8 additions and 10 deletions

View File

@ -29,10 +29,7 @@
For the controller (to run Ansible, stateless PXE server, Terraform...): For the controller (to run Ansible, stateless PXE server, Terraform...):
- SSH keys in `~/.ssh/{id_rsa,id_rsa.pub}` - 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/)) - 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)) - `vagrant` (optional, to create a local [test environment](./test))
For bare metal nodes: For bare metal nodes:
@ -48,19 +45,18 @@ For bare metal nodes:
### Building ### Building
Simply run: Open the tools container:
```sh ```sh
make make
``` ```
Or we can build each layer individually: Then build each layer:
```sh ```sh
make metal
make infra make infra
# or make apps
cd infra
make
``` ```
## Acknowledgments ## Acknowledgments

View File

@ -12,6 +12,7 @@ RUN apk add --no-cache \
RUN apk add --no-cache --repository "http://dl-cdn.alpinelinux.org/alpine/edge/testing" \ RUN apk add --no-cache --repository "http://dl-cdn.alpinelinux.org/alpine/edge/testing" \
helm \ helm \
kubectl \ kubectl \
lxd \
terraform terraform
WORKDIR /root/src WORKDIR /src

View File

@ -4,5 +4,6 @@ services:
tools: tools:
build: . build: .
volumes: volumes:
- ..:/root/src - ..:/src
- $HOME:/root
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock