The MyST CLI is used by MyST Studio behind-the-scenes to execute operations against target environments. However, the MyST CLI can also be used to trigger operations against data from MyST Studio. This can be useful in some cases such as:
MyST CLI has the concept of a MyST workspace which is a metadata directory that can be version controlled. In this example we will use Git.
For non-Studio customers, the MyST workspace is used for storing Platform Blueprint and Models in XML or Properties format. For Studio customers, the Platform Blueprints and Models are version-controlled in the MyST Studio repository. Platform Blueprints and Models can be retrieved from MyST Studio by defining MyST Studio connectivity details within the MyST workspace. Common use cases for this approach are:
If you don't have an existing MyST workspace, you can create and version control one as follows:
1 . Create a new folder for our MyST workspace.
mkdir myst-workspace
2 . Navigate to the myst-workspace and initialize it using MyST
cd myst-workspace
myst init
This will provide an output similar to the following:
MYST_HOME=/opt/myst
MYST_WORKSPACE=/u01/app/oracle/admin/myst-workspace
------------------------------------------------------------------------
R U B I C O N >< R E D MyST v3.6.2.1 (149)
...delivery...deMySTified..............................................
(c) 2011-2016 Rubicon Red Software Pty Ltd. All rights reserved
------------------------------------------------------------------------
Registered to : [email protected], CN=Rubicon Red, L=Brisbane, ST=QLD, C=Brisbane
Expires : Tue Aug 20 02:44:07 EDT 2019
Session ID : 05-04-16-22-14-15-8134
------------------------------------------------------------------------
Analysing request...
MyST workspace created at /u01/app/oracle/admin/myst-workspace
SUCCESS - 1 Second
3 . Create a file relative to the myst-workspace at resources/myst.properties
Add the details for your MyST Studio instance and include the API key that you copied before:
myst.studio.hostname=<MYST STUDIO HOST>
myst.studio.port=8085
myst.studio.api.key=<API KEY>
4 . Run the following command to display the myst usage
myst usage
This should retrieve all of the available Platform Models from MyST Studio. These platform models are named in the following convention:
env.<environment type>.<platform model>.platform
For example:
Configuration Description
------------- -----------
env.ci.soa.platform CI SOA Environment
env.dev.soa.platform Development SOA Environment
env.uat.soa.platform User Acceptance Testing Environment
env.prod.soa.platform Production SOA Environment
Take note of the Platform Model which you want to use.
5 . You can execute the MyST properties action on your platform model of choice by performing the following:
myst properties env.prod.soa.platform
This will display all of the properties of the given Platform Model.
6 . Lastly, version control your MyST workspace using your Version Control System of choice. In this example, we are using Git
git add myst-workspace/conf
git add myst-workspace/resources
git commit -m "Added MyST workspace"
git push origin master
NOTE: From the previous execution there will be a logs directory created under myst-workspace. You should avoid version controlling this file by following the steps above to only version control the conf and resources directories.
To see a full list of MyST actions, you can execute
myst usage
from the MyST workspace.
MyST actions executed from the MyST CLI with MyST Studio data follow the standard below:
myst <action name> env.<environment type>.<platform model>.platform