I am using my own scripts from http://github.com/chmouel/rise-mystack but you can obv just pre-setup your vm the way you want. I am using Fedora20 (but 21 should work as well)*
./rise.sh ssh vm
mkdir -p /opt/stack cd /opt/stack
heat_template_version: 2013-05-23 | |
description: > | |
Docker example template, you need to docker pull samalba/wordpress and samalba/mysql first. | |
resources: | |
wordpress: | |
type: DockerInc::Docker::Container | |
properties: | |
image: samalba/wordpress |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: Chmouel Boudjnah <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
#!/bin/bash | |
USER=$1 | |
REALNAME=$2 | |
PASS=$(pwgen -B -s -n 12 1) | |
if [[ -z ${USER} || -z ${REALNAME} ]];then | |
echo "znc-add-user.sh: login realname" | |
exit 1 | |
fi |
# Author: Chmouel Bodujnah <[email protected]> | |
# | |
# Pan a zsh tool to complete virtualenv tox targets and tests launched via | |
# testtools | |
# | |
# Demo: http://i.imgur.com/kJsJTjj.gif | |
# | |
# When you use zsh just source the file directly and when you are inside a | |
# project which has been pre-built with tox targets you can start do: | |
# pan <TAB> |
function check_up() { | |
service=$1 | |
host=$2 | |
port=$3 | |
max=13 # 1 minute | |
counter=1 | |
while true;do | |
python -c "import socket;s = socket.socket(socket.AF_INET, socket.SOCK_STREAM);s.connect(('$host', $port))" \ |
I am using my own scripts from http://github.com/chmouel/rise-mystack but you can obv just pre-setup your vm the way you want. I am using Fedora20 (but 21 should work as well)*
./rise.sh ssh vm
mkdir -p /opt/stack cd /opt/stack
#!/bin/bash | |
set -exf | |
PROJECT=myproject | |
CURDIR=$(dirname $(readlink -f $0)) | |
TOPDIR=$(git rev-parse --show-topklevel 2>/dev/null) | |
rm -rf ${CURDIR}/.build/rpm | |
mkdir -p ${CURDIR}/.build/rpm/{BUILD,SRPMS,SPECS,RPMS/noarch} | |
cp -r ${CURDIR}/SOURCES ${CURDIR}/.build/rpm |
FROM fedora:21 | |
MAINTAINER Chmouel Boudjnah <[email protected]> | |
RUN yum -y groupinstall 'Development Tools' | |
RUN yum -y install fedora-packager | |
RUN yum -y install yum-utils | |
RUN yum -y install sudo | |
RUN sed -i.bak -n -e '/^Defaults.*requiretty/ { s/^/# /;};/^%wheel.*ALL$/ { s/^/# / ;} ;/^#.*wheel.*NOPASSWD/ { s/^#[ ]*//;};p' /etc/sudoers |
#!/bin/bash | |
# script run inside the container | |
rpmbuild -ba rpmbuild/SPECS/project.spec || exit 1 | |
[[ -d /data ]] || exit 0 | |
sudo rm -rf /data/output | |
sudo cp -a rpmbuild/RPMS/noarch /data/output |
### The script which access oslo.cfg and print a value | |
chmouel@TheBatman:GIT/openstack/oslo.config$ cat ~/tmp/c.py [etcd] | |
import sys | |
from oslo.config import cfg | |
opt_group = cfg.OptGroup(name='simple', title='A Simple Example') | |
simple_opts = [ |