This file contains 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
sudo yum -y install git-all memcached postgresql-devel postgresql-server libxml2-devel libxslt-devel gcc-c++ gnupg graphviz which graphviz-ruby | |
sudo systemctl stop firewalld | |
sudo systemctl disable firewalld | |
sudo systemctl start memcached | |
sudo systemctl enable memcached | |
sudo sh -c "echo postgres:smartvm | chpasswd" | |
sudo -u postgres initdb -D /var/lib/pgsql/data | |
sudo systemctl start postgresql | |
sudo systemctl enable postgresql | |
sudo -u postgres psql -c "CREATE ROLE root SUPERUSER LOGIN PASSWORD 'smartvm'" |
This file contains 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 | |
db=$1 | |
pass=$(openssl rand -hex 10) | |
mysql -e "CREATE DATABASE $1" | |
mysql -e "GRANT ALL PRIVILEGES ON $db.* TO '$db'@'localhost' IDENTIFIED BY '$pass';" | |
mysql -e "GRANT ALL PRIVILEGES ON $db.* TO '$db'@'%' IDENTIFIED BY '$pass';" | |
echo $pass > .$db |
This file contains 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 | |
WEBNODE_ROOT='/srv/webnode' | |
DB_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' db-server) | |
DB_ROOT_PASSWD=$(docker inspect --format '{{ .Config.Env }}' db-server | awk {'print $1'} | awk -F '=' {'print $2'}) | |
echo "Enter wordress domain: " | |
read WP_DOMAIN | |
WP_DOMAIN_PASSWD=$(openssl rand -hex 10) | |
WP_DOMAIN_NAME=$(echo $WP_DOMAIN | awk -F '.' {'print $1'}) |
This file contains 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
config.j2 | |
{% for iface in item.int %} | |
interface {{ iface.name }} | |
no shutdown | |
ip address {{ iface.address }} {{ iface.netmask }} | |
{% endfor %} | |
router ospf 1 | |
{% for iface in item.int %} | |
{% if iface.ospf == "yes" %} | |
network {{ iface.address }} 0.0.0.0 area 0 |
This file contains 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
--- | |
- hosts: localhost | |
remote_user: marius | |
sudo: yes | |
tasks: | |
- name: Install Apache | |
yum: name=httpd state=installed | |
- name: Start Apache |
This file contains 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
- hosts: basenodes | |
tasks: | |
- name: Installs postfix mail server | |
apt: pkg=postfix state=installed update_cache=true | |
notify: | |
- start postfix | |
- name: Upload mandril authentication info | |
copy: src=/opt/files/postfix/mandril_passwd dest=/etc/postfix/mandril_passwd mode=0600 | |
register: mandril | |
notify: |
This file contains 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
source $(rvm 2.2.2 do rvm env --path) | |
gem install bundler -v "~>1.8.4" | |
bundle install --without qpid:metric_fu | |
cp config/database.pg.yml config/database.yml | |
cp certs/v2_key.dev certs/v2_key | |
bin/rails db:environment:set RAILS_ENV=development | |
bundle exec rake evm:db:reset | |
bundle exec rake db:seed | |
bundle exec rake evm:start |
This file contains 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/expect | |
set rs routeserver.sunrise.ch | |
set expstr RS_AS6730 | |
spawn telnet $rs | |
set route [lindex $argv 0] | |
expect -re "$expstr" | |
send "show ip bgp $route" | |
send -- "\r" | |
expect -re "$expstr" | |
send -- "exit\r" |
This file contains 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
heat_template_version: 2013-05-23 | |
description: Simple template to deploy a single compute instance | |
parameters: | |
image: | |
type: string | |
label: Image name or ID | |
description: Image to be used for compute instance | |
default: Fedora22 |
This file contains 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
[root@server-a cloud-user]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
ONBOOT="yes" | |
TYPE="OVSPort" | |
DEVICETYPE=ovs | |
OVS_BRIDGE=br-ex | |
[root@server-a cloud-user]# cat /etc/sysconfig/network-scripts/ifcfg-br-ex | |
DEVICE="br-ex" | |
BOOTPROTO="static" | |
ONBOOT="yes" |
OlderNewer