Skip to content

Commit

Permalink
Fix #187: preinstall homeworld packages on nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
celskeggs committed Jan 10, 2018
1 parent 5dc9541 commit e6f3152
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
6 changes: 6 additions & 0 deletions building/build-debs/homeworld-admin-tools/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
homeworld-admin-tools (0.1.29) stretch; urgency=medium

* Updated debian release

-- Cel Skeggs <[email protected]> Tue, 09 Jan 2018 20:27:58 -0500

homeworld-admin-tools (0.1.28) stretch; urgency=medium

* Updated debian release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ then
exit 1
fi

in-target systemctl mask nginx.service

# install packages
cp /homeworld-*.deb /target/
in-target dpkg -i /homeworld-*.deb
in-target dpkg --unpack /homeworld-*.deb
rm /target/homeworld-*.deb
in-target apt-get install --fix-broken --yes

in-target systemctl enable keyclient.service update-keyclient-config.timer prometheus-node-exporter.service

Expand Down
6 changes: 0 additions & 6 deletions building/build-debs/homeworld-admin-tools/src/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ def infra_install_packages(ops: setup.Operations) -> None:
for node in config.nodes:
ops.ssh("update apt repositories on @HOST", node, "apt-get", "update")
ops.ssh("upgrade packages on @HOST", node, "apt-get", "upgrade", "-y")
if node.kind == "supervisor":
ops.ssh("install supervisor packages on @HOST", node, "apt-get", "install", "-y",
"homeworld-bootstrap-registry", "homeworld-prometheus")
else:
ops.ssh("install standard packages on @HOST", node, "apt-get", "install", "-y",
"homeworld-services")


main_command = command.mux_map("commands about maintaining the infrastructure of a cluster", {
Expand Down
5 changes: 3 additions & 2 deletions building/build-debs/homeworld-admin-tools/src/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import packages
import keycrypt

PACKAGES = ("homeworld-apt-setup", "homeworld-knc", "homeworld-keysystem", "homeworld-prometheus-node-exporter")
PACKAGES = ("homeworld-apt-setup", "homeworld-knc", "homeworld-keysystem", "homeworld-prometheus-node-exporter", \
"homeworld-hyperkube", "homeworld-rkt", "homeworld-etcd", "homeworld-services", "homeworld-bootstrap-registry", \
"homeworld-prometheus", "homeworld-etcd-metrics-exporter")

# TODO: refactor this file to be more maintainable


# converts debian-9.2.0-amd64-mini.iso into a "cdpack", which can be more easily remastered
def regen_cdpack(source_iso, dest_cdpack):
with tempfile.TemporaryDirectory() as d:
Expand Down
1 change: 1 addition & 0 deletions building/build-debs/homeworld-admin-tools/src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def setup_bootstrap_registry(ops: Operations) -> None:
ops.ssh_mkdir("create ssl cert directory on @HOST", node, "/etc/homeworld/ssl")
ops.ssh_upload_bytes("upload %s key to @HOST" % REGISTRY_HOSTNAME, node, keydata, "/etc/homeworld/ssl/%s.key" % REGISTRY_HOSTNAME)
ops.ssh_upload_path("upload %s cert to @HOST" % REGISTRY_HOSTNAME, node, certpath, "/etc/homeworld/ssl/%s.pem" % REGISTRY_HOSTNAME)
ops.ssh("unmask nginx on @HOST", node, "systemctl", "unmask", "nginx")
ops.ssh("restart nginx on @HOST", node, "systemctl", "restart", "nginx")


Expand Down

0 comments on commit e6f3152

Please sign in to comment.