First, create a GPT partition table.
- boot partition, label: EFI, flags: boot + ESP; size: 1GB, format to FAT32;
- root partition (label: root), must same size on all devices!
- swap partition.
| # Following command will create: | |
| # * instance(s) named "training" | |
| # * based on ubuntu image | |
| # * start 10* instances | |
| # * append index starting from 1 | |
| # * 5Gb disk per instance | |
| # * sizing based on flavor: m1.tiny | |
| # * connected to network: training_net | |
| # * security group applied: training_sec | |
| # * ssh key will be: mysshkey |
| # create folders if does not exist | |
| mkdir -p ~/.fonts | |
| mkdir -p ~/.config/fontconfig/ | |
| # download noto color emoji font from https://www.google.com/get/noto/#emoji-zsye-color | |
| # extract NotoColorEmoji.ttf file into ~/.fonts/ | |
| # create font config file | |
| cat << 'EOF' > ~/.config/fontconfig/fonts.conf | |
| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"> |
| # first, get the iso from http://releases.ubuntu.com/ | |
| # make working dir hierarchy in /tmp (you'll need enough ram for this) | |
| sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project} | |
| sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso | |
| sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash | |
| sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive | |
| # customize the live fs with systemd-nspawn (a better chroot) | |
| sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive |
| #!/usr/bin/env bash | |
| # | |
| # Fix virtualenv symlinks after upgrading python with Homebrew and then running | |
| # `cleanup`. | |
| # | |
| # After upgrading Python using Homebrew and then running `brew cleanup` one can | |
| # get this message while trying to run python: | |
| # dyld: Library not loaded: @executable_path/../.Python | |
| # Referenced from: /Users/pablo/.venv/my-app/bin/python | |
| # Reason: image not found |
| #!/bin/bash | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| #!/bin/bash | |
| # Run as root | |
| set -e | |
| apt-get update | |
| apt-get install -y build-essential | |
| apt-get install -y libncurses5-dev | |
| useradd mysql |
| Neutron Services: | |
| root@controller-1:/etc/neutron# neutron agent-list | |
| +--------------------------------------+--------------------+--------------+-------+----------------+ | |
| | id | agent_type | host | alive | admin_state_up | | |
| +--------------------------------------+--------------------+--------------+-------+----------------+ | |
| | 084a9d2b-14d7-471f-911d-91facb33f695 | Open vSwitch agent | compute-1 | :-) | True | | |
| | 164be455-8f4a-4316-aa2c-a2fe7da5e951 | Open vSwitch agent | controller-1 | :-) | True | | |
| | 2a88780b-874e-47de-ba0c-72d2b981c144 | Metering agent | controller-1 | :-) | True | | |
| | 441ed1f3-5c3e-4aa8-afe4-c562b25372b2 | Loadbalancer agent | controller-1 | :-) | True | | |
| | 49cd36ab-4556-425c-ae55-5293447dfebc | Metadata agent | controller-1 | :-) | True | |