Skip to content

Getting started

Requirements

Creating a new SmartShape environment

Each SmartShape installation is composed of multiple environments (ex: dev, staging, prod...). To create and initialize a new environment, please use the cluster initialize command.

smartshape-cli cluster initialize

This command will generate the following smartshape folder:

smartshape
└── env
    └── dev
        ├── default.jsonnet
        └── smartshape.jsonnet

Default configuration

By Default:

  • The environment's name is dev.
  • The environment's hostname is smartshape.io.test.

To create an environment named prod

smartshape-cli cluster initialize prod

Generating a target

Each environment can lead to the generation of one (or more) targets. Each target is a specific

The available targets are:

  • helm (WIP) to deploy SmartShape on Kubernetes via the Helm package manager.
  • docker-compose to deploy SmartShape on Docker via docker-compose.
smartshape-cli cluster generate --target docker-compose
smartshape-cli cluster generate --target helm
The helm target is still a work in progress

The helm target is still under heavy development and might not work as expected.

Generate a target for specific environments

The cluster generate command accepts one or more optionnal path to one ore more environments.

For example the following command will generate the docker-compose target only for the dev environment:

smartshape-cli cluster generate -t docker-compose ./smartshape/env/dev

Best practices

  • Add all the files in the smartshape folder to your version control system (ex: Git).
  • Always remember to call the cluster generate command after editing smartshape.jsonnet.

Target files are read-only!

The files generated under the target folder are read-only on purpose, and any modification will be completely erased by the next cluster generate command.

Running a target

Once a target has been generated, it can be managed using the corresponding tool(s).

For example, the docker-compose target generates a valid docker-compose.yml stack and all the corresponding configuration files for all its services.

cd ./smartshape/env/dev/target/docker-compose
docker-compose -p smartshape up -d
cd ./smartshape/env/dev/target/docker-compose/vagrant
vagrant up

Then:

  • Add the environment's hostname (smartshape.io.test by default) to your hosts file.
  • Open the SmartShape Web application on https://smartshape.io.test/app/

registry.aerys.in Docker registry authentication

In order to be able to pull the container images used to run SmartShape, you must first run docker login registry.aerys.in.


November 24, 2022 November 24, 2022