allomov
11/19/2014 - 5:00 PM

add-admin-ui.sh

diff --git a/cf-192-main-template.yml b/cf-192-main-template.yml
index 7eb3ee9..176eed2 100644
--- a/cf-192-main-template.yml
+++ b/cf-192-main-template.yml
@@ -5,6 +5,8 @@ director_uuid: 5be14c89-6fc7-4a70-b54a-55f254cc3a77
 releases:
  - name: cf
    version: 192
+ - name: admin-ui
+   version: latest

 networks:
 - name: default
@@ -18,7 +20,7 @@ networks:
     - 192.168.0.1 - 192.168.0.196
     - 192.168.0.198 - 192.168.3.231
     static:
-    - 192.168.3.232 - 192.168.3.242
+    - 192.168.3.232 - 192.168.3.243
     cloud_properties:
       name: VM Network

@@ -40,7 +42,7 @@ compilation:
 resource_pools:
   - name: small
     network: default
-    size: 9
+    size: 11
     stemcell:
       name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
       version: 2719.3
@@ -259,6 +261,39 @@ jobs:
     - name: default
       static_ips:
       - 192.168.3.239
+
+  # admin-ui
+  - name: admin_ui
+    template: admin_ui
+    release: admin-ui
+    instances: 1
+    resource_pool: small
+    persistent_disk: 5120
+    networks:
+      - name: default
+        static_ips:
+        - 192.168.3.242
+
+  - name: register_admin_ui
+    template: register_admin_ui
+    release: admin-ui
+    instances: 1
+    resource_pool: small
+    lifecycle: errand
+    networks:
+      - name: default
+
+  - name: deregister_admin_ui
+    template: deregister_admin_ui
+    release: admin-ui
+    instances: 1
+    resource_pool: small
+    lifecycle: errand
+    networks:
+      - name: default
+
+
+

 properties:
   metron_agent:
@@ -584,3 +619,39 @@ properties:
     status:
       user: admin
       password: admin-password
+
+  admin_ui:
+    cloud_controller_uri: http://api.vprolisko.cloudfoundry.altoros.com
+    cloud_controller_ssl_verify_none: false
+    uri: admin.vprolisko.cloudfoundry.altoros.com
+    nats:
+      port: 4222
+      user: nats
+      password: admin-password
+      address: 192.168.3.234
+    uaa:
+      url: http://uaa.vprolisko.cloudfoundry.altoros.com
+      admin_client_secret: admin-password
+      client:
+        id: admin_ui
+        secret: admin_ui_secret
+      scopes:
+        admin:
+          - admin_ui.admin
+        user:
+          - admin_ui.user
+    ccdb:
+      scheme: postgres
+      address: 192.168.3.232
+      port: 5524
+      username: ccadmin
+      password: admin-password
+      database: ccdb
+    uaadb:
+      scheme: postgres
+      address: 192.168.3.232
+      port: 5524
+      username: uaaadmin
+      password: admin-password
+      database: uaadb
+
git clone -b i18n https://github.com/Altoros/admin-ui-boshrelease.git altoros-admin-ui-boshrelease
cd altoros-admin-ui-boshrelease

git submodule init 
git submodule update

# create and deploy Admin UI BOSH release:
bosh create release --force
bosh upload release <path-to-release-manifest.yml>     # the last line from an output of the last command

git apply manifest.diff

bosh -n deploy
bosh run errand register_admin_ui

uaac target http://uaa.vprolisko.cloudfoundry.altoros.com
uaac token client get admin -s admin-password               # actually uaa admin secret is used here
uaac member add admin_ui.admin admin                        # don't forget it !