vastness-io / project

Vastness-io project status
0 stars 0 forks source link

vastup #3

Closed PI-Victor closed 5 years ago

PI-Victor commented 6 years ago

Purpose

e.g.: oc cluster up

Add functionality to vastctl to bring up the platform with all components isolated in docker containers running locally.

This feature would help with

Motivation

I started to add all of the components to the existing docker-compose and realized there might be a better way that provides a better out-of-the-box experience see above ^^.

Proposed functionality

e.g.:

$ vastctl up
Starting backing service
Fetching docker.io/posgres:9.6.8-alpine...

Loading coordinator component...
Fetching quay.io/vastness.io/coordinator:latest

Loading vcs-webhook component...
Fetching quay.io/vastness.io/vcs-webhook:latest

Loading linguist component...
Fetching quay.io/vastness.io/linguist:latest

Starting coordinator...
Service available on port 8081
Logs available at container mounted path  /tmp/coordinator/logs/

Starting vcs-webhook...
Service available on port 8082
Logs available at container mounted path  /tmp/vcs-webhook/logs/

Starting linguist...
Service available on port 8083
Logs available at container mounted path /tmp/linguist/logs/

Vastness is now up 
Endpoint available at https://127.0.0.1:8081

Optionally: vastctl up --stateful /Users/local-user/coordinator/persistent_db_data_path would mount a local path of your choice where the persistent data is stored from the container. In this case it's postgres backing service, but can be any type of persistent data path separated based on component.

Driver and OS support

docker/machine

Aiding local development (Future)

You can pass container local build context to the docker daemon

vastctl up build-context --coordinator /Users/test-user/projects/go/src/github.com/vastness-io/coordinator
vastctl up build-context --vcs-webhook /Users/test-user/projects/go/src/github.com/vastness-io/vcs-webhook
vastctl up build-context --linguist /Users/test-user/projects/go/src/github.com/vastness-io/linguist

This will save a yaml file with a context definition containing the path to your component. You could then code, build the component and do a vastctl up and that will:

I know this sounds like "a LOT" but i've done this before in https://github.com/openshift/origin/pull/9564/files unfortunately that didn't make it in.

jw-s commented 6 years ago

@PI-Victor Awesome Idea, completely agree! After thinking it through a bit, we should seperate these into a seperate CLI as vastctl has the intention of interacting with a running ecosystem rather than provisioning. So this could be the start of a provisioner cli, which could deploy the ecosystem on any arch with the concept of "backends" or something?

PI-Victor commented 6 years ago

i think backends is a great idea, i didn't think of that. regarding vastctl i thought the same that it's a lot of stuff to add to it and doesn't exactly fit the purpose. I already started to stub something out and will show a PoC when i have it working. I've done it in a private repo because i know myself and i never finish stuff so i don't wanna disappoint.

jw-s commented 6 years ago

@PI-Victor It would be nice to have a repo here and see the progression, that way I can also work on it too?

PI-Victor commented 6 years ago

sure, no problem! if you're interested i will migrate it to the org immediately. L.E.: available at: https://github.com/vastness-io/vastup