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 bash | |
set -e -x -u | |
# Update and install required packages | |
apt update | |
apt -y dist-upgrade | |
apt install -y git vim python unzip iotop htop iftop | |
# Clone OSA |
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
sudo apt-get install qemu-utils | |
sudo modprobe nbd | |
sudo qemu-nbd --connect=/dev/nbd0 /full/path/to/qcow2/image/file | |
sudo mkdir /mnt/ubuntu | |
sudo mount /dev/nbd0p1 /mnt/ubuntu |
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
source openrc | |
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img | |
qemu-img convert -f qcow2 -O raw cirros-0.3.4-x86_64-disk.img cirros-0.3.4-x86_64-disk.raw | |
openstack image create --public --protected --disk-format raw --file cirros-0.3.4-x86_64-disk.raw cirros-0.3.4-x86_64 |
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
CREATE USER "username" WITH PASSWORD 'password' | |
CREATE DATABASE "database" | |
GRANT ALL ON "username" TO "database" |
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
# Configure via SSH | |
sudo vi /etc/network/interfaces | |
################################################################################ | |
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback |
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
sudo mount /dev/sdd1 /mnt | |
sudo vi /etc/apt/sources.list | |
################################ | |
deb file:/mnt/ trusty main restricted | |
################################ | |
sudo apt-get install bridge-utils vlan ifenslave | |
sudo vi /etc/apt/sources.list | |
################################ | |
#deb file:/mnt/ trusty main restricted | |
################################ |
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 | |
set -ex | |
DB_HOST=mysql | |
DB_USERNAME=root | |
DB_PASSWORD=password | |
DB_NAME=wp13 | |
DB_IMAGE=mariadb:10.1.16 | |
DB_CONTAINER=dockerwphlp_wp-db-hlp13_1 |
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
server { | |
listen 80; | |
server_name CHANGEME; | |
## redirect http to https ## | |
rewrite ^ https://CHANGEME$request_uri? permanent; | |
} | |
server { | |
listen 443 ssl; |
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
version: '2' | |
services: | |
db: | |
image: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=mypass | |
wp: | |
image: wordpress |
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
version: '2' | |
services: | |
db: | |
image: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=mypass | |
- constraint:node==node01 | |
networks: | |
- backend |
NewerOlder