aboutsummaryrefslogtreecommitdiffstats
path: root/charms/trusty/contrail-webui/hooks/install
diff options
context:
space:
mode:
Diffstat (limited to 'charms/trusty/contrail-webui/hooks/install')
-rwxr-xr-xcharms/trusty/contrail-webui/hooks/install30
1 files changed, 30 insertions, 0 deletions
diff --git a/charms/trusty/contrail-webui/hooks/install b/charms/trusty/contrail-webui/hooks/install
new file mode 100755
index 0000000..d981389
--- /dev/null
+++ b/charms/trusty/contrail-webui/hooks/install
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+import shutil
+
+import setup
+setup.pre_install()
+
+from charmhelpers.core import hookenv
+from charmhelpers.fetch import (
+ configure_sources,
+ apt_upgrade,
+ apt_install,
+)
+
+PACKAGES = [ "contrail-web-controller", "nodejs",
+ "supervisor", "contrail-utils" ]
+
+def install():
+ hookenv.log('Installing contrail-webui')
+
+ # set apt preferences
+ shutil.copy('files/40contrail', '/etc/apt/preferences.d')
+
+ configure_sources(True, "install-sources", "install-keys")
+ apt_upgrade(fatal=True, dist=True)
+ apt_install(PACKAGES, fatal=True)
+ setup.fix_services()
+
+if __name__ == "__main__":
+ install()