mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 19:07:13 +00:00
* add local rack * add instructions for trusting local ca * handle local rack idling * must install ca to system keychain * update tests * change router service type on linux local * trim platform name when passing to rack * restart microk8s after installation |
||
|---|---|---|
| .. | ||
| main.tf | ||
| README.md | ||
Convox on Local Workstation
Initial Setup
MacOS
- Install Docker Desktop
- Go to Docker Desktop Preferences
- Go to the Advanced tab
- Drag the CPU slider to the halfway point
- Drag the Memory slider to at least 8GB
- Go to the Kubernetes tab
- Enable Kubernetes
Ubuntu
snap install microk8s --classic --channel=1.13/stablemicrok8s.enable dns storagemkdir -p ~/.kubemicrok8s.config > ~/.kube/configsudo snap restart microk8s
Install Convox
- Clone this repository and switch to the directory containing this
README - Run
terraform init - Run
terraform apply
DNS Setup
Set *.convox to be resolved by the local Rack's DNS server.
MacOS
sudo mkdir -p /etc/resolversudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/convox'
Ubuntu
sudo mkdir -p /usr/lib/systemd/resolved.conf.dsudo bash -c "printf '[Resolve]\nDNS=$(kubectl get service/resolver-external -n convox-system -o jsonpath="{.spec.clusterIP}")\nDomains=~convox' > /usr/lib/systemd/resolved.conf.d/convox.conf"systemctl daemon-reloadsystemctl restart systemd-networkd systemd-resolved
CA Trust (optional)
To remove browser warnings about untrusted certificates for local applications you can trust the Rack's CA certificate.
This certificate is generated on your local machine and is unique to your Rack.
MacOS
kubectl get secret/ca -n convox-system -o jsonpath="{.data.tls\.crt}" | base64 -d > /tmp/casudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/ca
Ubuntu
kubectl get secret/ca -n convox-system -o jsonpath="{.data.tls\.crt}" | base64 -d > /tmp/casudo mv /tmp/ca /usr/local/share/ca-certificates/convox.crtsudo update-ca-certificates
Convox CLI Setup
- Install the Convox CLI
- Run
export RACK_URL=$(terraform output rack_url) - Run
convox rackto ensure that your CLI is connected to your new Rack