Skip to content

Instantly share code, notes, and snippets.

View adam-stokes's full-sized avatar
🦧

Adam Stokes adam-stokes

🦧
  • North Carolina
  • 05:47 (UTC -04:00)
View GitHub Profile
class PasswordInput(WidgetWrap):
""" Password input dialog
"""
__metaclass__ = signals.MetaSignals
signals = ['done']
def __init__(self, title, done_signal_handler):
self.title = '{0} (Esc)'.format(title)
self.pass_input = Edit(caption=('', 'Password: '), mask='*')
class SingleInstall:
def __init__(self, opts, ui):
self.opts = opts
self.ui = ui
self.config = Config()
self.container_name = 'uoi-bootstrap'
self.container_path = '/var/lib/lxc'
self.container_abspath = os.path.join(self.container_path,
self.container_name)
def container_run(name, cmd, nowait=False):
""" run command in container
:param str name: name of container
:param str cmd: command to run
"""
ip = container_ip(name)
cmd = "sudo -H -u {3} TERM=xterm256-color ssh -t -q " \
"-l ubuntu -o \"StrictHostKeyChecking=no\" " \
"-o \"UserKnownHostsFile=/dev/null\" " \
def container_run(name, cmd, nowait=False):
""" run command in container
:param str name: name of container
:param str cmd: command to run
"""
ip = container_ip(name)
cmd = "sudo -H -u {3} TERM=xterm256-color ssh -t -q " \
"-l ubuntu -o \"StrictHostKeyChecking=no\" " \
"-o \"UserKnownHostsFile=/dev/null\" " \
# Copied from lp:landscape-charm /config/landscape-deployments.yaml
# and then:
# # charm no longer requires a license file
# sed -e 's/license-file$/\/dev\/null/g' -i landscape-deployments.yaml
#
# Users who want to use the landscape installer should:
# # $CONTENTS here is what is in https://pastebin.canonical.com/112787/
# # for now. When landscape is released, we can make this something public.
# sed -e 's/include-file:\/\/repo-file/$CONTENTS/g' -i landscape-deployments.yaml
_common:
# Copied from lp:landscape-charm /config/landscape-deployments.yaml
# and then:
# # charm no longer requires a license file
# sed -e 's/license-file$/\/dev\/null/g' -i landscape-deployments.yaml
#
# Users who want to use the landscape installer should:
# # $CONTENTS here is what is in https://pastebin.canonical.com/112787/
# # for now. When landscape is released, we can make this something public.
# sed -e 's/include-file:\/\/repo-file/$CONTENTS/g' -i landscape-deployments.yaml
_common:
# Copied from lp:landscape-charm /config/landscape-deployments.yaml
# and then:
# # charm no longer requires a license file
# sed -e 's/license-file$/\/dev\/null/g' -i landscape-deployments.yaml
#
# Users who want to use the landscape installer should:
# # $CONTENTS here is what is in https://pastebin.canonical.com/112787/
# # for now. When landscape is released, we can make this something public.
# sed -e 's/include-file:\/\/repo-file/$CONTENTS/g' -i landscape-deployments.yaml
_common:
language: python
python:
- 3.4
notifications:
email: false
cache: apt
before_install:
- "sudo add-apt-repository -y ppa:cloud-installer/experimental"
- "sudo apt-get update"
install:
@adam-stokes
adam-stokes / config-single.yaml
Created January 27, 2015 18:28
single config for openstack installer
headless: false
install_only: false
install_type: Single
openstack_password: pass
upstream_deb: openstack_0.21-0ubuntu1_all.deb
# vlan config
bucket:
&myinterfaces |
# 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