Make it easy to use GCK on MacOS/Windows
Goal
Start using GCK in 10mins.
Intro
GCK uses Docker extensively. This requires a Docker-enabled host.
Docker is preferred when you work natively on Linux, as due to natively accessed filesystem the performance of GCK is great, and it's ease and immutability aspect out-weights all downsides.
GCK works really well with SSH enabled workflow, allowing you to use GCK across network hosts, instead of installing all dependencies locally.
The design philosophy behind GCK is that:
- it tries to be fully immutable
- it tries to workaround of Rails keeping persistent configs at all costs
- GCK does selective rewrites
- GCK models all dependencies as separate containers to provide a separation of resources, and a way of abstract dependencies and inter-connections
- GCK does not install any dependencies on your host system
Idea
Lets build around SSH enabled workflow and Docker-native workflow:
- Use the https://github.com/alpinelinux/alpine-make-vm-image to create a pre-build snapshot of
master
- The snapshot has all dependencies installed, and development environment seeded
- Do not use Vagrant, as this is a too big and requires "building image"
- Distribute image as
.raw
and.ovhf
format, preconfigured to use shared networking and host-based networking - Mount sources from VM using system-provided
NFS
client, that is limited to host-based networking - Provide a helper tool
gck
installed on host systems to manage installations (all installs are either native or SSH) - Do not support any other workflows: like running natively via Docker for Mac, as we do not consider Docker for Mac to be performant
gck
tool
This describes a potential gck
interface:
-
gck -e a-name-of-env
: indicates an environment - all envs are stored in
~/.config/gck/envs/*.conf
and are simple env-variables - the non-existing environment returns an error
- to mount/create env do:
gck a-name-of-new-env create a-name-of-new-env
you will be asked a bunch of questions how your env can be accessed, exposing some of.env
settings => it could even download and configure VirtualBox from OVMF using latest snapshot :) -
gck open-fs
: mounts and open filesystem -
gck open-web
: opens a Web interface in a default browser -
gck open-vs
: opens a VS-Code to a target env (it can be over SSH) -
gck *
: passthrough all to respectivemake
- you control GCK env with starting/stopping VM
-
gck
is written initially in Bash and later likely in Go, as we don't really want to require installing any dependencies
Edited by Kamil Trzciński