Skip to content

MSO4SC/MSOOrchestrator-CLI

Repository files navigation

MSOOrchestrator-CLI

Orchestration CLI of MSO4SC Project, based on Cloudify CLI. Its goal is to provide an interface to interact with a remote MSOOrchestrator instance. For more information, visit http://docs.getcloudify.org/4.1.0/cli/overview/.

Installation

MSOOrchestrator-CLI offers a vagrant file and a docker image to easily start using the command line. Besides it can be installed following the docs.

Docker

At Docker Hub you can find the latest build image to start using the CLI.

# docker run -it --name cli -v <PATH>/resources:/cli/resources mso4sc/msoorchestrator-cli -- bash
[root@ec71ada311d6 cli]# exit
# docker start -ai cli
[root@ec71ada311d6 cli]# exit

To build: docker build -t mso4sc/msoorchestrator-cli .

Vagrant

A vagrant file is provided to create a new Virtual Vox machine with the CLI inside.

ℹ️
Modify the path "../resources/blueprint-examples" to bind the blueprint examples repository to your virtual machine. Comment the line if you don’t want to bind the examples.

Usage

Local mode

Orchestration CLI of MSO4SC Project, based on Cloudify CLI, allows you to execute your blueprints without connecting to the remote MSOOrchestrator instance.

ID=BLUEPRINT_ID
cfy blueprints validate blueprint.yaml # Validate your blueprint
cfy init --install-plugins -b $ID \
    -i ../local-blueprint-inputs.yaml blueprint.yaml # Create a new local app instance
cfy executions start -b $ID install # Bootstrap the app instance
cfy executions start -b $ID run_jobs # Execute the app instance workflow
cfy executions start -b $ID uninstall # Revert the app instance

Remote mode

To connect to a MSOOrchestrator instance, run the following command with your user credentials and remote host or IP of the orchestrator. If you don’t have an orchestrator instance yet, follow MSOOrchestrator installation first.

cfy profile use [ORCHESTRATOR_IP] -t default_tenant -u [USER] -p [PASS]
cfy status

Once you are connected to the MSOOrchestrator, you can perform the usual Cloudify CLI workflow for install, run and uninstall your TOSCA based applications:

ID=MY_ID
cfy blueprints upload -b $ID blueprint.yaml # Upload the blueprint
cfy deployments create -b $ID \
    -i ../local-blueprint-inputs.yaml $ID # Create the app instance
cfy executions start -d $ID install # Bootstrap the app instance
cfy executions start -d $ID run_jobs # Execute the app instance workflow
cfy executions start -d $ID uninstall # Revert the app instance
cfy deployments delete $ID # Remove the app instance
cfy blueprints delete $ID # Remove the blueprint

You can find several examples and real applications in the resources respository @ Github

MSOOrchestrator installation

The MSO Orchestrator, based on cloudify, can be easily installed from this CLI.

Requirements:
  • Running instance of MSOOrchestrator-CLI vagrant or docker image.

  • Centos 7 remote machine with at least 2 CPUs and 4 Gb of RAM (4 CPUs and 12 Gb RAM recommended), reachable by the CLI, with requiretty disabled, and no password for sudo command.

    • Set Defaults !requiretty on sudoers file (/etc/sudoers)

    • If user is not root, echo '[USER] ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

    • Check if firewalld is installed, and install it if not:

yum install firewalld
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld

To install the orchestrator, just execute in the CLI:+ ./bootstrap-manager.sh [Centos HOST] [Centos SSH USER] [Orchestrator NEW ADMIN USER] [Orchestrator NEW ADMIN PASSWORD]

About

Orchestrator CLI of the MSO4SC project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published