Friday, March 27, 2015

Murano: Sending files to a VM

Murano can manage your software on top of VM. If there is no underlying software orchestration under Murano, it is possible to use Murano itself for delivering files to the VM.
It is possible to do as a part of Execution plan template which usually reside in Resources folder of Murano application package. Here is an example of execution plan.

FormatVersion: 2.0.0
Version: 1.0.0
Name: Install Kubernetes Minion

Parameters:
  master: $master


Body: |
  return install(args.master).stdout

Scripts:
  install:
    Type: Application
    Version: 1.0.0
    EntryPoint: install.sh
    Files: 
      - minion.conf
    Options:
      captureStdout: true
      captureStderr: true


In the Scripts section there is a node Files where it is possible to define a list of files which should be delivered to the VM and placed in the same directory where entry point script will be placed. In the package these files should be stored in "Resources/scripts" folder.
Murano uses MQ to deliver execution plans to the VM and binary files should be base64 encoded to be successfully delivered. It is possible to enforce base64 encoding of the files by putting triangle brackets around a file name.

Files: 
  - minion.conf
  - <myjava.jar>

All files will be accessible from the same directory where entry point shell script is placed. You can work with these files from shell script like that:
cp -f minion.conf /etc/salt/minion

Happy weekends!



No comments:

Post a Comment