Skip to content

OpenStack activator Script

Giuseppe Tricomi edited this page Nov 20, 2017 · 1 revision

Introduction

This simple routine is used to identify when a new VM is instantiated on a cloud.

This is made comparing VMs uuid list returned by the Openstack agent with a list of VMs scanned stored inside an inner repository. If a new VM is recognized the system retrieve the information of that VM and launch an isntance of the JAVA activation script with the parameters required for that VM.

The scripts are lauched each 3 minutes by a cron job.

Requirements

Few elements are needed by the activation script:

  1. A directory used to contains the credential files $DIRPATH/rcfiles/

  2. A directory in which store the files used as repository for the UUID of the VMs checked located in $DIRPATH"/repoVMsChecked/UUID_REPO_[BORROWER_NAME]. The files are generated authomatically.

  3. Openstack clients Official guide

  4. Crontab on your environement

How to Execute

User have to add the cronjob the launch the check of new VMs on target cloud.

crontab -e

*/3 * * * * java -jar $DIRPATH/StaticRoutine.sh [DIRPATH] [FCOExecutableOpenStack.jar] [Security responsible email]