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
#cloud-config | |
#type: master | |
--- | |
hostname: master01 | |
users: | |
- name: core | |
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe. | |
groups: | |
- sudo |
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
from __future__ import absolute_import | |
# Import Standard Libs | |
import logging | |
import json | |
import os | |
# Import Salt Libs | |
import salt.returners |
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 | |
# | |
# Copyright 2012 by Jeff Laughlin Consulting LLC | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
""" | |
Cloud Cruiser Report Emailer | |
This script takes in arguments from the | |
command line to generate and email Cloud Cruiser reports. | |
Example usage: | |
python ccremailer.py --url http://cloudcruiser.mysite.com:8080 --username rcurrah --password mypass --usergroup-name admin --report-name MyReport --email-server smtp.mysite.com --email-from [email protected] --email-to [email protected],[email protected] --debug true | |
""" | |
import requests |
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
# CTX Instance | |
print type(ctx.instance) | |
<class 'cloudify.context.NodeInstanceContext'> | |
print dir(ctx.instance) | |
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_context', '_endpoint', '_get_node_instance_if_needed', '_get_node_instance_ip_if_needed', '_host_ip', '_modifiable', '_node', '_node_instance', '_relationships', 'host_ip', 'id', 'relationships', 'runtime_properties', 'update'] |
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/python | |
""" | |
This script will start services found in the INIT_DIR for Ubuntu or Redhat. | |
The services found can be filtered by using the SERVICE_STARTS_WITH parameter. | |
Required services will be started before the services found using the list parameter REQUIRED_SERVICES. | |
""" | |
from subprocess import Popen, PIPE | |
import time | |
import sys | |
import threading |
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/python | |
""" | |
This script will start services found in the INIT_DIR for Ubuntu or Redhat. | |
The services found can be filtered by using the SERVICE_STARTS_WITH parameter. | |
Required services will be started before the services found using the list parameter REQUIRED_SERVICES. | |
""" | |
from subprocess import Popen, PIPE | |
import time | |
import sys | |
import threading |
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
""" | |
OS packages required: | |
1. libxml2-dev (Debian), libxml2-devel (RHEL) | |
2. libxslt-dev (Debian), libxslt-devel (RHEL) | |
3. python-dev (Debian), python-devel (RHEL) | |
Python packages required: | |
1. lxml | |
2. requests |
NewerOlder