Skip to content

Commit

Permalink
testing old versions again
Browse files Browse the repository at this point in the history
  • Loading branch information
agabert committed Jul 31, 2017
1 parent 27262e5 commit 66266d5
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 82 deletions.
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ etchosts:
mv $(HOSTSFILE).NEW $(HOSTSFILE)

stage1: $(PREREQUISITES)
@figlet UPGRADE SYSTEMS || true
test -f "$(TMPDIR)/.SUCCESS_$(@)" || $(FAB)pingcheck
test -f "$(TMPDIR)/.SUCCESS_$(@)" || $(FAB)sshcheck
$(RUNSTAGE)
Expand Down Expand Up @@ -87,60 +86,50 @@ stage2: $(PREREQUISITES)
rm $(TMPDIR)/.SUCCESS_$(@)

stage3: $(PREREQUISITES)
@figlet SET UP VPN || true
mkdir -pv "$(TMPDIR)/etc/tinc"
$(RUNSTAGE)

stage4: $(PREREQUISITES)
@figlet CONFIGURE CONTAINERS || true
$(RUNSTAGE)

haproxy: $(PREREQUISITES)
@figlet CONFIGURE HAPROXY || true
$(RUNSTAGE)

stage5: $(PREREQUISITES)
@figlet UPGRADE CONTAINERS || true
test -f "$(TMPDIR)/.SUCCESS_$(@)" || $(FAB)pingcheck
$(RUNSTAGE)

stage6: $(PREREQUISITES)
@figlet INSTALL OPENSTACK || true
mkdir -pv $(TMPDIR)/img
cp img/favicon.ico $(TMPDIR)/img/favicon.ico
cp img/midokura.png $(TMPDIR)/img/midokura.png
$(RUNSTAGE)

stage7: $(PREREQUISITES)
@figlet INSTALL MIDONET || true
$(RUNSTAGE)

#
# tempest
#
stage8: $(PREREQUISITES)
@figlet TEMPEST || true
$(RUNSTAGE)

#
# swift
#
stage9: $(PREREQUISITES)
@figlet SWIFT || true
$(RUNSTAGE)

#
# vtep logic
#
stage10: $(PREREQUISITES)
@figlet VTEP || true
$(RUNSTAGE)

#
# install gnome on all servers
#
stage11: $(PREREQUISITES)
@figlet GNOME || true
$(RUNSTAGE)

uptime: $(PREREQUISITES)
Expand Down
7 changes: 3 additions & 4 deletions conf/allinone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#
config:

mtu_container: 1400

# used for the midonet gateway veth pair
fake_transfer_net: 192.168.254

Expand All @@ -25,9 +27,6 @@ config:

openstack_release: kilo

midonet_oss_version: 2015.06
midonet_oss_openstack_plugin_version: kilo

# must be a file under /usr/share/zoneinfo
timezone: Europe/Berlin

Expand Down Expand Up @@ -79,7 +78,7 @@ roles:

servers:
os001:
ip: 192.168.6.121
ip: 192.168.12.183
# used for the containers on this host
dockernet: 192.168.252.0/24

14 changes: 7 additions & 7 deletions include/orizuru.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ FAB = $(PP) $(CC) $(TT) $(PW) fab $(FABSSHCONFIG) $(FABFABFILE) $(@)
RUNSTAGE_CHECK = test -f "$(TMPDIR)/.SUCCESS_$(@)"
RUNSTAGE_TOUCH = date | tee "$(TMPDIR)/.SUCCESS_$(@)"

RUNSTAGE = figlet "running $(@)" || echo "running $(@)"; $(RUNSTAGE_CHECK) || $(FAB) && $(RUNSTAGE_TOUCH)
RUNSTAGE = echo "running $(@)"; $(RUNSTAGE_CHECK) || $(FAB) && $(RUNSTAGE_TOUCH)

REQUIREMENTS = $(INCLUDE)/requirements.txt

Expand All @@ -71,14 +71,14 @@ $(TMPDIR):
mkdir -pv "$(TMPDIR)"

pipinstalled:
which pip || sudo apt-get -y install python-pip
dpkg -l | grep ^ii | grep python-dev || sudo apt-get -y install python-dev
dpkg -l | grep ^ii | grep python-yaml || sudo apt-get -y install python-yaml
dpkg -l | grep ^ii | grep python-netaddr || sudo apt-get -y install python-netaddr
#which pip || sudo apt-get -y install python-pip
#dpkg -l | grep ^ii | grep python-dev || sudo apt-get -y install python-dev
#dpkg -l | grep ^ii | grep python-yaml || sudo apt-get -y install python-yaml
#dpkg -l | grep ^ii | grep python-netaddr || sudo apt-get -y install python-netaddr

pipdeps: $(TMPDIR)
test -f "$(TMPDIR)/.SUCCESS_pipinstall" || \
sudo pip install --upgrade -r "$(REQUIREMENTS)" && \
#test -f "$(TMPDIR)/.SUCCESS_pipinstall" || \
# sudo pip install --upgrade -r "$(REQUIREMENTS)" && \
touch "$(TMPDIR)/.SUCCESS_pipinstall"

cleanup:
Expand Down
6 changes: 1 addition & 5 deletions lib/orizuru/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def __prepare_config_docker_ips(self):
idx = idx + 1

def __prepare_config(self):
common1 = 'htop vim screen atop tcpdump nload make git dstat tinc bridge-utils openjdk-7-jre-headless iperf beep figlet'
common1 = 'htop vim screen atop tcpdump nload make git dstat tinc bridge-utils openjdk-7-jre-headless iperf beep'
common2 = 'traceroute mosh python-mysqldb mysql-client-core-5.5 apparmor docker.io python git minicom strace sharutils'

common_packages = "%s %s" % (common1, common2)
Expand Down Expand Up @@ -237,10 +237,6 @@ def __prepare_config(self):

defaults["fip_base"] = "10.0.0"

defaults["mtu_physical"] = 1500
defaults["mtu_mezzanine"] = 1500
defaults["mtu_container"] = 1500

for overloading_key in defaults:
if overloading_key not in self._config:
overloading_value = defaults[overloading_key]
Expand Down
110 changes: 58 additions & 52 deletions lib/orizuru/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from netaddr import IPNetwork as CIDR

from fabric.colors import yellow
from fabric.colors import yellow, blue, green
from fabric.utils import puts

import cuisine
Expand All @@ -50,7 +50,6 @@ def configure(self):
self.localegen()
self.name_resolution()
self.os_release()
self.newrelic()
self.datastax()
self.midonet()

Expand All @@ -62,7 +61,7 @@ def name_resolution(self):
if env.host_string not in self._metadata.roles["all_containers"]:
run("hostname %s" % env.host_string.split(".")[0])

run("ip address add %s/32 dev lo" % self._metadata.servers[env.host_string]["ip"])
run("ip address add %s/32 dev lo || echo" % self._metadata.servers[env.host_string]["ip"])

cuisine.file_write("/etc/hostname", env.host_string.split(".")[0])

Expand Down Expand Up @@ -103,19 +102,66 @@ def repokey(cls, url):
wget -SO- "${URL}" | apt-key add -
""" % url)

def newrelic(self):
cuisine.file_write("/etc/apt/sources.list.d/newrelic.list", """
deb [arch=amd64] http://apt.newrelic.com/debian/ newrelic non-free
""")

self.repokey("https://download.newrelic.com/548C16BF.gpg")

def datastax(self):
if env.host_string in self._metadata.containers:
run("""
apt-key add - <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBExkbXsBCACgUAbMWASAz/fmnMoWE4yJ/YHeuFHTK8zloJ/mApwizlQXTIVp
U4UV8nbLJrbkFY92VTcC2/IBtvnHpZl8eVm/JSI7nojXc5Kmm4Ek/cY7uW2KKPr4
cuka/5cNsOg2vsgTIMOZT6vWAbag2BGHtEJbriMLhT3v1tlu9caJfybu3QFWpahC
wRYtG3B4tkypt21ssWwNnmp2bjFRGpLssc5HCCxUCBFLYoIkAGAFRZ6ymglsLDBn
SCEzCkn9zQfmyqs0lZk4odBx6rzE350xgEnzFktT2uekFYqRqPQY8f7AhVfj2DJF
gVM4wXbSoVrTnDiFsaJt/Ea4OJ263jRUHeIRABEBAAG0LVJpcHRhbm8gUGFja2Fn
ZSBSZXBvc2l0b3J5IDxwYXVsQHJpcHRhbm8uY29tPokBPgQTAQIAKAIbAwYLCQgH
AwIGFQgCCQoLBBYCAwECHgECF4AFAlW/zKMFCRLBYKQACgkQNQIA8rmZo3LebAgA
gAwWkvBrPaD5Kf8H4uw9rXtHnHYxX5G6cOVJ3vuWCs1ov7m3JWq918q00hWfLtOs
zb15kFcjcEJ7kiRFJmAXZhcX2I0DHTmTZSl9orKzoUlXQqAANJGdek8pzdTDUQfz
V26k63d6eLqjXotrb0hFzg7B8VSolxRE44S5k1xhzUCedOqYYsWVv3xnRIP6UBPt
WLvzrLa0o9x/hT4w81dOP4rzZMuq2RApnenoz9AZwJrmZ14QW2ncy4RbqK6pKdRJ
y57vBv8F0LkGlLwBd/JYWwQ85lUTkNG5wCWdj0IEYTO3+fGyO1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GK5i6w/LZyhxkfbkPX+pbbe1Ept+SZCcwWVc/S6veGZWQ1pNHR2
RW6F3WE0Mle6xWtvW1NlMs4ATEqS13GS4RVlgE07KTe/oBRkd+4NwXAQoEzUvoRr
j5Ad7LVKeygeUUyaWP+qN7kBDQRMZG17AQgAypZBEfm9pM8Tr4ktsHp1xThYHvzT
OScLPZcCaF1Gjg8em0cQI4z4yN+yffsmUD4/dGcRxZgVms/jTexKQ8Z/Ps3e4vRG
b4RCFaY0KhW4t+TTJJ9I5wvFzXZj7zNFxiQWpueiq/cDiBY+Liv3zMSOBaXzxR6L
7igNPKi/0ELLyCIU/okUwqc0O/4r5PgFANkMyvvVNqzxjC5s8MXbGivJXiML67/Y
0M/siNqDSia/TGItpXjvi7v1zulbiIV0iSBkO3vsxNE0xXGBXY/UztAShN3FTbx9
CZDupi35wgqK7McJ3WSjEDzwkElmwkmh7JdLziyH09kS1wRqiLcB+wSTywARAQAB
iQElBBgBAgAPAhsMBQJVv8zOBQkSwWDOAAoJEDUCAPK5maNyLl4H/3n/+xZsuKia
fHtBUMh44YRabEX1Bd10LAfxGlOZtKV/Dr1RaKetci6RRa5sJj0wKra6FhIryuqS
jFTalPF3o8WjVEA5AjJ3ddSgAwX5gGJ3u+C0XMI0E6h/vAXh6meFxHtGinYr1Gcp
P1/S3/Jy+0cmTt3FvqBtXtU3VIyb/4vUNZ+dY+jcw/gs/yS+s+jtR8hWUDbSrbU9
pja+p1icNwU5pMbEfx1HYB7JCKuE0iJNbAFagRtPCOKq4vUTPDUQUB5MjWV+89+f
cizh+doQR9z8e+/02drCCMWiUf4iiFs2dNHwaIPDOJ8Xn9xcxiUaKk32sjT3sict
XO5tB2KhE3A=
=YO7C
-----END PGP PUBLIC KEY BLOCK-----
EOF
""")

cuisine.file_write("/etc/apt/sources.list.d/datastax.list", """
deb [arch=amd64] http://debian.datastax.com/community 2.0 main
""")
self.repokey("http://debian.datastax.com/debian/repo_key")
#self.repokey("https://debian.datastax.com/debian/repo_key")

def midonet(self):
# Install(self._metadata).apt_get_update()
Expand Down Expand Up @@ -151,6 +197,7 @@ def midonet(self):
else:
plugin_url_override = ""

puts(blue("setting up Midokura repos"))
run("""
if [[ "%s" == "True" ]] ; then set -x; fi
Expand Down Expand Up @@ -291,7 +338,6 @@ def install(self):
self.login_stuff()
self.apt_get_update()
self.common_packages()
self.newrelic()
self.rp_filter()
self.cloud_repository()
self.apt_get_update()
Expand Down Expand Up @@ -492,46 +538,6 @@ def rp_filter(self):
""")

def newrelic(self):
if "NEWRELIC_LICENSE_KEY" in os.environ:
if env.host_string not in self._metadata.containers:
run("rm -fv /etc/newrelic/nrsysmond.cfg* || true")

cuisine.package_ensure("newrelic-sysmond")

run("""
SERVER_NAME="%s"
DOMAIN_NAME="%s"
LICENSE_KEY="%s"
cat>/etc/newrelic/nrsysmond.cfg<<EOF
license_key=${LICENSE_KEY}
loglevel=info
logfile=/var/log/newrelic/nrsysmond.log
hostname=${SERVER_NAME}.${DOMAIN_NAME}
EOF
nrsysmond-config --set license_key="${LICENSE_KEY}"
update-rc.d newrelic-sysmond defaults
/etc/init.d/newrelic-sysmond start || true
/etc/init.d/newrelic-sysmond restart || true
for i in $(seq 1 12); do
ps axufwwwww | grep -v grep | grep "nrsysmond" && break || true
sleep 1
done
ps axufwwwwwwwww | grep -v grep | grep nrsysmond
""" % (
env.host_string,
self._metadata.config["domain"],
os.environ["NEWRELIC_LICENSE_KEY"]
))

def cloud_repository(self):
run("rm -rf /etc/apt/sources.list.d/cloudarchive-*")

Expand Down
1 change: 1 addition & 0 deletions stages/stage6/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ def stage6_container_openstack_glance():

cuisine.file_write("/tmp/.%s.lck" % sys._getframe().f_code.co_name, "xoxo")

@parallel(pool_size=5)
@roles('all_containers')
def stage6_container_openstack_keystone_keystonerc():
metadata = Config(os.environ["CONFIGFILE"])
Expand Down
6 changes: 3 additions & 3 deletions stages/stage7/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,9 +1362,9 @@ def stage7_test_connectivity():

cxx=[]

cxx.append('wget -O/dev/null http://www.midokura.com')
cxx.append('ping -c3 www.midokura.com')
cxx.append('ping -c3 www.google.com')
cxx.append('wget -O/dev/null http://www.midokura.de')
cxx.append('ping -c3 www.midokura.de')
cxx.append('ping -c3 www.google.de')

for cxc in cxx:
puts(green("trying to run command [%s] in testvm" % cxc))
Expand Down

0 comments on commit 66266d5

Please sign in to comment.