Skip to content

Commit

Permalink
feat: migrate from Vagrant to k3d for dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
locmai committed Apr 21, 2022
1 parent af19daf commit 1cce170
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ terraform.rc

metal/kubeconfig.yaml
metal/kubeconfig.backup.yaml
metal/kubeconfig.dev.yaml

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -77,5 +78,3 @@ venv/
node_modules/
.cache
.docz

.vagrant
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ bootstrap:
tools:
make -C tools

.PHONY: dev
dev:
make -C metal cluster env=dev
make -C metal k3d env=dev
make -C bootstrap env=dev

.PHONY: stag
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/root/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global:
enabled: true
domain: "maibaloc.com"
domain: "172-28-0-3.nip.io"
repoURL: https://github.com/locmai/humble.git

system:
Expand Down
28 changes: 4 additions & 24 deletions docs/2_try_on_a_vm.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 2. Try on a VM
route: /try-on-a-vm
name: 2. Try with Docker
route: /try-with-docker
---

## Prerequisites
Expand All @@ -9,7 +9,6 @@ route: /try-on-a-vm

- docker
- make
- vagrant
- virtualbox

### Reserve compute resources
Expand All @@ -19,25 +18,6 @@ route: /try-on-a-vm
- 128GB of disk space
- 10GB of memory

## Deploy Humble On A VM
## Deploy Humble On Docker

First, spin up the VM:

```
VAGRANT_CWD=./metal vagrant up
```

Then run the following commands to get everything deployed:

```
make tools
make dev
```

## Clean Up

When we're done with the VM, we can destroy it:

```
VAGRANT_CWD=./metal vagrant destroy -f
```
TBD
8 changes: 7 additions & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN yes | pacman --sync --refresh \
docker \
docker-compose \
git \
glibc \
graphviz \
helm \
kubectl \
Expand All @@ -28,6 +29,11 @@ RUN yes | pacman --sync --refresh \
python-kubernetes \
python-netaddr \
python-pip \
terraform
terraform \
wget

RUN wget -O /usr/local/bin/k3d https://github.com/k3d-io/k3d/releases/download/v5.4.1/k3d-linux-amd64

RUN chmod +x /usr/local/bin/k3d

RUN pip install docker-compose

0 comments on commit 1cce170

Please sign in to comment.