Skip to content

Instantly share code, notes, and snippets.

View tamirko's full-sized avatar

Tamir Korem tamirko

  • www.whitesourcesoftware.com
View GitHub Profile
@tamirko
tamirko / kill_executions.py
Last active August 11, 2016 09:35
Kill deployment's executions
#!/usr/bin/env python
# Run this first source /opt/mgmtworker/env/bin/activate
import sys
from cloudify_rest_client import CloudifyClient
from cloudify_rest_client.executions import Execution
client = CloudifyClient('localhost')
@tamirko
tamirko / my.yaml
Last active July 28, 2016 14:28
How to scale a vm and a floating IP in cfy 3.4 ?
node_templates:
apache_vm:
type: cloudify.openstack.nodes.Server
capabilities:
scalable:
properties:
default_instances: 1
relationships:
- target: apache_ip
type: cloudify.openstack.server_connected_to_floating_ip
@tamirko
tamirko / create_wagon.sh
Last active August 11, 2016 12:20
Create a wagon on CentOs
#!/bin/bash
source /opt/mgmtworker/env/bin/activate
pip freeze > requirements.txt
deactivate
virtualenv xxx
source xxx/bin/activate
pip install -r requirements.txt
@tamirko
tamirko / fortigate_inputs_file.yaml
Created July 26, 2016 18:38
fortigate_inputs_file.yaml
image: REPLACE_WITH_Your_fortigate_image
flavor: REPLACE_WITH_A_flavor_id_1024M_RAM_1_CPU_at_most
fortigate_port_public: port1
fortigate_port_private: port2
fortigate_port_mgmt: port3
security_group_name_ssh_only: REPLACE_WITH_A_SECURITY_GROUP_WITH_AN_OPENED_SSH_PORT
external_network_name: REPLACE_WITH_A_YOUR_OPENSTACK_NETWORK_WHICH_HAS_ACCESS_TO_THE_WORLD
network_public_name: fortigate-net-public
use_existing_network_public: false
subnet_public_name: fortigate-subnet-public
@tamirko
tamirko / snmpproxy2.py
Last active July 19, 2016 12:52
Write to the snmp log file
import time
from snmpraw import SNMPRawCollector
from diamond.metric import Metric
class SNMPProxyCollector(SNMPRawCollector):
def collect_snmp(self, device, host, port, community):
"""
@tamirko
tamirko / bootstrapCfy34WithOpenStack.sh
Last active July 18, 2016 17:17
Install a simple CFY 3.4 manager which works with OpenStack
# This document describes how you need to setup your environment from scratch in order work
# with a Simple Cloudify manager (version 3.4.0) which can also deploy applications/VNFs on an OpenStack account
# and/or on an AWS account.
# You need to create/provision two VMs : One for the Cloudify CLI and another for the Cloudify Manager.
# The manager VM must be either CentOs 7.* or RHEL 7.*.
# You need to run all the following.
# - Note that some of them, need to be run on the manager VM and some on the Cloudify CLI VM.
# On the manager VM
@tamirko
tamirko / ariaAndHidden.html
Last active July 11, 2016 08:31
aria and hidden text
<span role="img" aria-labelledby="ddd" title="This is my bg image title" class="my_class_bg_image">
<span class="hidden_r">This is a hidden text that only screen readers can read</span>
<span id="ddd">This is my text which is shown when the image cannot be loaded,
but it's also there and invisible and when the image load succeeds
</span>
</span>
@tamirko
tamirko / aria-labelledby.html
Created July 10, 2016 14:19
aria-labelledby - good for accessibility ?
<span role="img" aria-labelledby="ddd" title="This is my bg image title" class="my_class_bg_image">
<span id="ddd">This is my text which is shown when the image cannot be loaded,
but it's also there and invisible and when the image load succeeds
</span>
</span>
@tamirko
tamirko / Example.out
Created June 28, 2016 11:27
Output of the XAP Deployment Tool
*************************************************************
XAP Management URL is in http://192.168.0.73:9099
Create a new space named benchmarkSpace
--------------------------------------
xap_container_e4cc5 is in 192.168.0.70
xap_container_5664a is in 192.168.0.71
--------------------------------------
If you have a Linux laptop:
Download the client VM's Private key from http://192.168.0.72:8000/private_key_xap11_0_0_2806_1467111649055_775.pem
Then run : chmod 400 private_key_xap11_0_0_2806_1467111649055_775.pem
@tamirko
tamirko / runTheXapBenchmark.sh
Last active June 19, 2016 10:05
Run The XAP Benchmark
#! /bin/bash
export XAP_NIC_ADDRESS=$1
export XAP_LOOKUP_LOCATORS=$1
cd /tmp/xap/gigaspaces-xap-premium-11.0.0-ga/tools/benchmark/bin/
./run.sh -clean -url jini://${XAP_LOOKUP_LOCATORS}:4174/benchmarkSpace_container1/benchmarkSpace
exit