Command Line Deployment
A common task with developing software is deploying code to different environments. This guide provides basic instructions for setup and deployment of three applications (environments) with the same code.
Create Deployment Applications (Environments)
Before deploying code, a single application must exist for each environment to be deployed as well as an associated product for each application. The product may be reused among the applications as long as it is accessible to each. The Quickstarts can help with the creation of these components. Follow the Application Quickstart as needed.
Code can then be deployed using Exosite's provided tool:
The following strategy encourages storing configuration files separately from source control. This allows one to deploy the same code to different environments.
Deployment (Murano CLI)
Murano CLI is used to deploy code to an application environment. Each environment will use a different configuration file that will contain your business, product, and application identifiers. To create the files, first change into your project directory and execute the following commands. Change the IDs to suit your own specific environments.
cat > .murano.dev <<EOF [business] id = 5caff01db1f0ca15 [product] id = fea51b1eca5e10ad [application] id=AAAAAAAA EOF cat > .murano.stg <<EOF [business] id = 5caff01db1f0ca15 [product] id = fea51b1eca5e10ad [application] id=BBBBBBBB EOF cat > .murano.prod <<EOF [business] id = 5caff01db1f0ca15 [product] id = fea51b1eca5e10ad [application] id=CCCCCCCC EOF cat > .env <<EOF MURANO_CONFIGFILE=.murano.dev EOF
The three application IDs are written to
MURANO_CONFIGFILE environment and Dotenv
The environment variable
MURANO_CONFIGFILE can be used by Murano CLI to specify a configuration file to load. In conjunction with dotenv support, one can easilyy switch between the environments.
To deploy to the varying environments, change the MURANO_CONFIGFILE value and execute the "syncup" command similar to the following example.
export MURANO_CONFIGFILE=.murano.dev murano syncup -V export MURANO_CONFIGFILE=.murano.stg murano syncup -V export MURANO_CONFIGFILE=.murano.prod murano syncup -V