Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Cloud-PG/dodas-go-client

Repository files navigation

DODAS client (project moved to https://github.com/dodas-ts/dodas-go-client)

N.B. This project has been moved to https://github.com/dodas-ts/dodas-go-client

Build Status

Reference Manual

Quick start

Download the binary from the latest release on github. For instance:

wget https://github.com/dodas-ts/dodas-go-client/releases/download/v0.3.3/dodas.zip
unzip dodas.zip
cp dodas /usr/local/bin

CLI autocomplete

Autocompletion for bash and zsh is supported

  • bash add the following line to ~/.bashrc: . <(dodas autocomplete)
  • zsh add the following line to ~/.zshrc: source <(dodas zsh-autocomplete)

You can find now a template for creating your client configuration file in config/client_config.yaml. Note that by default the client will look for $HOME/.dodas.yaml.

Now you are ready to go. For instance you can validate a tosca template like this:

dodas validate --template tests/tosca/valid_template.yml

Tip: you can find supported tosca templates for applications and k8s deployments on the DODAS template repo

or you can create a cluster through the InfrastructureManager configured in your configuration file:

dodas create --config my_client_conf.yaml my_template.yaml

To list the Infrastructure ID of all your deployments:

dodas list infIDs

You can eventually login into a vm in created cluster that has a public IP address with:

dodas login <infID> <vmID>
# e.g. dodas login cb585e5c-33b6-11ea-8776-0242ac150003 0

Using docker image

In alternative you can create a docker image with the compiled client inside with:

make docker-img-build

and then you can bind the configuration files and run the previous commands as:

# list the Infrastructure ID of all your deployments
docker run -v $HOME/.dodas.yaml:/app/.dodas.yaml --rm dodas list infIDs

Building from source

To compile on a linux machine (go version that supports go modules is required for building from source: e.g. >= v1.12):

make build

while to compile with Docker:

make docker-build

It's also possible to cross compile for windows and macOS with:

make windows-build
make macos-build

Contributing

If you want to contribute:

  1. create a branch
  2. upload your changes
  3. create a pull request

Thanks!