This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
which openvpn | |
if [ $? -ne 0 ]; then | |
# Install openvpn | |
which yum | |
if [ $? -ne 0 ]; then | |
# Install on Ubuntu | |
sudo apt-get install -y openvpn | |
else | |
# Install on CentOs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install -y gcc | |
sudo apt-get install -y python-pip | |
sudo apt-get install -y python-virtualenv | |
sudo apt-get install -y python-dev | |
sudo pip install --upgrade pip | |
sudo pip install --upgrade virtualenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import time | |
from cloudify_rest_client.executions import Execution | |
from cloudify_cli.utils import get_rest_client | |
from influxdb.influxdb08 import InfluxDBClient | |
from influxdb.influxdb08.client import InfluxDBClientError | |
client = get_rest_client() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following should be defined in your blueprint : | |
node_templates: # or node_types if you specify this on a type | |
my_vm: | |
type: ... | |
... | |
interfaces: | |
... | |
my_custom_interface: | |
restart_linux_vm: scripts/restart_my_vm.sh | |
restart_windows_vm: scripts/restart_my_vm.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use The next three lines - Do NOT remove them !!! | |
# - It seems that one of these three lines, somehow sets the value of instance _node_instance host_id | |
# - which is used later on. | |
host_id2=$(ctx instance host_id) | |
host_id3=$(ctx instance runtime_properties host_id) | |
host_id4=$(ctx _node_instance host_id) | |
host_id=$(ctx instance _node_instance host_id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install -y npm | |
sudo apt-get install -y git | |
sudo apt-get install -y unzip | |
sudo apt-get install -y gcc | |
sudo apt-get install -y python-pip | |
sudo apt-get install -y python-virtualenv | |
sudo apt-get install -y python-dev | |
sudo pip install --upgrade pip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Memory Leak patch | |
sudo sed -i 's/--autoscale=5,2 \\/--maxtasksperchild=1 \\\n --autoscale=5,2 \\/g' /usr/lib/systemd/system/cloudify-mgmtworker.service | |
sudo systemctl daemon-reload | |
sudo systemctl restart cloudify-mgmtworker.service | |
# Enable auto complete for metrics in the UI (per deployment) | |
sudo sed -i 's/ like / /g' /opt/cloudify-ui/backend/services/MonitoringService.js | |
sudo systemctl restart cloudify-webui.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cfy deployments delete -d nc-cfy-newVM | |
Deleting deployment nc-cfy-newVM from management server MNGR_Ip_ADDRESS | |
An error occurred on the server: 502: 502: <html> | |
<head><title>502 Bad Gateway</title></head> | |
<body bgcolor="white"> | |
<center><h1>502 Bad Gateway</h1></center> | |
<hr><center>nginx/1.8.0</center> | |
</body> | |
</html> | |
[http://MNGR_Ip_ADDRESS:80/api/v2/deployments/nc-cfy-newVM] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm | |
sudo yum -y update | |
sudo yum install -y -q git | |
sudo yum install -y python-pip | |
sudo yum install -y gcc | |
sudo yum install -y python-virtualenv | |
sudo yum install -y python-setuptools | |
sudo yum install -y python-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from cloudify_rest_client.executions import Execution | |
from cloudify_cli.utils import get_rest_client | |
client = get_rest_client() | |
deployment_id = sys.argv[1] |