diff --git a/Hackfest_Demos/OSM-15/setup_scripts/bundle.yaml b/Hackfest_Demos/OSM-15/setup_scripts/bundle.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dd80284e91d6aa4f3d573757a73a41fbcb5c3cb8 --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/bundle.yaml @@ -0,0 +1,194 @@ +# Copyright 2020 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: osm +bundle: kubernetes +docs: https://discourse.charmhub.io/t/osm-docs-index/8806 +description: | + **Single instance Charmed OSM** + + Charmed OSM is an OSM distribution, developed and maintained by Canonical, which uses + Juju charms to simplify its deployments and operations. This bundle distribution refers + to the development stack for OSM and allows you to deploy a single instance OSM bundle + that is fast, reliable, and a complete solution with MicroStack and MicroK8s. + + - Industry‐aligned and fully compliant with upstream + - Predictable release cadence and upgrade path + - Simplified deployments and operations + - Stable and secure + - Supported with Ubuntu Advantage + - Availability of managed services +applications: + zookeeper: + charm: zookeeper-k8s + channel: latest/stable + scale: 1 + storage: + data: 100M + kafka: + charm: kafka-k8s + channel: latest/stable + scale: 1 + trust: true + storage: + data: 100M + mariadb: + charm: charmed-osm-mariadb-k8s + scale: 1 + series: kubernetes + storage: + database: 50M + options: + password: manopw + root_password: osm4u + user: mano + mongodb: + charm: mongodb-k8s + channel: 5/edge + scale: 1 + series: kubernetes + storage: + db: 50M + nbi: + charm: osm-nbi + channel: latest/beta + trust: true + scale: 1 + options: + database-commonkey: osm + log-level: DEBUG + resources: + nbi-image: opensourcemano/nbi:testing-daily + ro: + charm: osm-ro + channel: latest/beta + trust: true + scale: 1 + options: + log-level: DEBUG + resources: + ro-image: opensourcemano/ro:testing-daily + ng-ui: + charm: osm-ng-ui + channel: latest/beta + trust: true + scale: 1 + resources: + ng-ui-image: opensourcemano/ng-ui:testing-daily + lcm: + charm: osm-lcm + channel: latest/beta + scale: 1 + options: + database-commonkey: osm + log-level: DEBUG + resources: + lcm-image: opensourcemano/lcm:testing-daily + mon: + charm: osm-mon + channel: latest/beta + trust: true + scale: 1 + options: + database-commonkey: osm + log-level: DEBUG + keystone-enabled: true + resources: + mon-image: opensourcemano/mon:testing-daily + pol: + charm: osm-pol + channel: latest/beta + scale: 1 + options: + log-level: DEBUG + resources: + pol-image: gatici/pol:testing-daily + vca: + charm: osm-vca-integrator + channel: latest/beta + scale: 1 + ingress: + charm: nginx-ingress-integrator + channel: latest/stable + scale: 1 + prometheus: + charm: osm-prometheus + channel: latest/stable + scale: 1 + series: kubernetes + storage: + data: 50M + options: + default-target: "mon:8000" + grafana: + charm: osm-grafana + channel: latest/stable + scale: 1 + series: kubernetes + keystone: + charm: osm-keystone + channel: latest/beta + scale: 1 + resources: + keystone-image: opensourcemano/keystone:testing-daily +relations: + - - grafana:prometheus + - prometheus:prometheus + - - kafka:zookeeper + - zookeeper:zookeeper + - - keystone:db + - mariadb:mysql + - - lcm:kafka + - kafka:kafka + - - lcm:mongodb + - mongodb:database + - - lcm:vca + - vca:vca + - - ro:ro + - lcm:ro + - - ro:kafka + - kafka:kafka + - - ro:mongodb + - mongodb:database + - - pol:kafka + - kafka:kafka + - - pol:mongodb + - mongodb:database + - - mon:mongodb + - mongodb:database + - - mon:kafka + - kafka:kafka + - - mon:vca + - vca:vca + - - nbi:mongodb + - mongodb:database + - - nbi:kafka + - kafka:kafka + - - nbi:ingress + - ingress:ingress + - - nbi:prometheus + - prometheus:prometheus + - - nbi:keystone + - keystone:keystone + - - mon:prometheus + - prometheus:prometheus + - - ng-ui:nbi + - nbi:nbi + - - ng-ui:ingress + - ingress:ingress + - - mon:keystone + - keystone:keystone + - - mariadb:mysql + - pol:mysql + - - grafana:db + - mariadb:mysql \ No newline at end of file diff --git a/Hackfest_Demos/OSM-15/setup_scripts/common-vars b/Hackfest_Demos/OSM-15/setup_scripts/common-vars index 96a7474d59d58372c66025481502a2af587ed86c..560aa9e78594ea9d92c84a925b8e75c6b12f8e0f 100644 --- a/Hackfest_Demos/OSM-15/setup_scripts/common-vars +++ b/Hackfest_Demos/OSM-15/setup_scripts/common-vars @@ -15,8 +15,8 @@ if [ ! -z ${DEBUG} ]; then set -x fi -START=5 -MAX=5 +START=6 +MAX=10 if [ ! -z $2 ] ; then START=$1 diff --git a/Hackfest_Demos/OSM-15/setup_scripts/create-openstack-vm.sh b/Hackfest_Demos/OSM-15/setup_scripts/create-openstack-vm.sh index 0775f460a69182d4a2f6a8d589ca34783021a66c..d72945aad65ee82893c0b142f85e439f72fa8d10 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/create-openstack-vm.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/create-openstack-vm.sh @@ -22,8 +22,9 @@ wait echo "Waiting for OSM VM to be ready" IP=`openstack server list --name $VM_NAME --column Networks -f yaml | head -3 | tail -1 | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+'` while [ 1 ] ; do - sleep 5 - ALIVE=$(ssh -T -o ConnectTimeout=1 -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} 'cloud-init status --wait | tail -1' 2> /dev/null) + sleep 10 + ALIVE=$(ssh -T -o ConnectTimeout=1 -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} "cloud-init status --wait" | tail -1 2> /dev/null) + echo $ALIVE if [ "${ALIVE}" == "status: done" ] ; then break ; fi done diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15admin.pub b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15admin.pub new file mode 100644 index 0000000000000000000000000000000000000000..d1cc177dcdc12b30302875cc081c1e23e95f8ed6 --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15admin.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0tEErNpyJzsFev9mWdaR3wz+o2TAauagIsYFclBYuSEEFrEgxmQ3YirRdd03a7hTlrD430hXVoIiLHJEoAjEs+vnigWP/sz5CnWmA+rbFsR1WJeNvcfHTI4UEnVWeCMsOKQVqEbXFn1EA/Q+OgNhlDWnpR1TuzAvODVjyZqRwdFpywFia+W40psCdL6Mmi9YaIJxxFhsssU7pmDFgLQhRj7jprRs6oO+i4eBT2keh+Ll3W1k8IkDosHR0KDDb3+dL/vOhu+sMNcUC+vXlx/hrvXH9Me0AX3NBgzRHs6AwrHs5 Generated-by-Nova +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDf4RAmNBrznLTjzlf8a2SxX6ZWEVBT09z3Fktp1rXa9eBzkiWB/c2x8iJ693coB6GAs70weliDiLUp/OeHuJH7jeCquzRTRBfu4qlkNBlzPeFJgxUqxMnW+s6p8h8nnLmc3noHJJ/t0/Cv2Tq8/PiV84hl3A7bxFxO8oPKPG9LJURCFweDKiv9FELaH7RfG0VEg+O/cmeAcK/zjMZCU6O2JvsZ1v9i+vEMki8s8cmNNzWTgetDOwIU1SUf8dUST7Kzue0OhST3Asidyny6ymkQOGMeiP78qMhU5H6DDQlwsBeJ3DY4SIBcVrZ0bbMp0u9d7Ra4+1qOSOldYDnOfqLnWoQjXAuqEaOe+ivxQ27C8upw39tRAbbYXAy4CUqYDH1q5+D+3YotxHfwo2oAmSMj1cC0BOOCxP+oqxfWXVirOqB4LKkpVvKVHQMyLhBkxg94OiTy1JlRDNGwpZbjZQYgOHZ26g9OSmUKbbHmyiyqWdlKUVykehLBAoUfpA8WQ20= davide@davide-asus diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group10.rc b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group10.rc new file mode 100644 index 0000000000000000000000000000000000000000..9d6862520a98a8a51727c5e4ed91b0815eaef5b3 --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group10.rc @@ -0,0 +1,12 @@ +export OS_AUTH_TYPE=password +export OS_AUTH_URL=http://172.21.247.1:5000/v3 +export OS_DOMAIN_NAME= +export OS_IDENTITY_API_VERSION=3 +export OS_INTERFACE=public +export OS_PASSWORD=hackfest15group-10! +export OS_PROJECT_DOMAIN_NAME= +export OS_PROJECT_NAME=hackfest15group10 +export OS_REGION_NAME=RegionOne +export OS_TENANT_NAME=hackfest15group10 +export OS_USERNAME=hackfest15group10 +export OS_USER_DOMAIN_NAME= diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group6.rc b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group6.rc new file mode 100644 index 0000000000000000000000000000000000000000..1ae4a9ddbf6c03f475f124a4e34224088aeed2aa --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group6.rc @@ -0,0 +1,12 @@ +export OS_AUTH_TYPE=password +export OS_AUTH_URL=http://172.21.247.1:5000/v3 +export OS_DOMAIN_NAME= +export OS_IDENTITY_API_VERSION=3 +export OS_INTERFACE=public +export OS_PASSWORD=hackfest15group-6! +export OS_PROJECT_DOMAIN_NAME= +export OS_PROJECT_NAME=hackfest15group6 +export OS_REGION_NAME=RegionOne +export OS_TENANT_NAME=hackfest15group6 +export OS_USERNAME=hackfest15group6 +export OS_USER_DOMAIN_NAME= diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group7.rc b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group7.rc new file mode 100644 index 0000000000000000000000000000000000000000..0a9fb81e594d2e4d7e857e8b8c44c7029851ec4f --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group7.rc @@ -0,0 +1,12 @@ +export OS_AUTH_TYPE=password +export OS_AUTH_URL=http://172.21.247.1:5000/v3 +export OS_DOMAIN_NAME= +export OS_IDENTITY_API_VERSION=3 +export OS_INTERFACE=public +export OS_PASSWORD=hackfest15group-7! +export OS_PROJECT_DOMAIN_NAME= +export OS_PROJECT_NAME=hackfest15group7 +export OS_REGION_NAME=RegionOne +export OS_TENANT_NAME=hackfest15group7 +export OS_USERNAME=hackfest15group7 +export OS_USER_DOMAIN_NAME= diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group8.rc b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group8.rc new file mode 100644 index 0000000000000000000000000000000000000000..88fce050102d3ceb500d4480a34f55674558a111 --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group8.rc @@ -0,0 +1,12 @@ +export OS_AUTH_TYPE=password +export OS_AUTH_URL=http://172.21.247.1:5000/v3 +export OS_DOMAIN_NAME= +export OS_IDENTITY_API_VERSION=3 +export OS_INTERFACE=public +export OS_PASSWORD=hackfest15group-8! +export OS_PROJECT_DOMAIN_NAME= +export OS_PROJECT_NAME=hackfest15group8 +export OS_REGION_NAME=RegionOne +export OS_TENANT_NAME=hackfest15group8 +export OS_USERNAME=hackfest15group8 +export OS_USER_DOMAIN_NAME= diff --git a/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group9.rc b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group9.rc new file mode 100644 index 0000000000000000000000000000000000000000..88e8fc8c370c7e617b49c96fcf81cdf013565a42 --- /dev/null +++ b/Hackfest_Demos/OSM-15/setup_scripts/hackfest15group9.rc @@ -0,0 +1,12 @@ +export OS_AUTH_TYPE=password +export OS_AUTH_URL=http://172.21.247.1:5000/v3 +export OS_DOMAIN_NAME= +export OS_IDENTITY_API_VERSION=3 +export OS_INTERFACE=public +export OS_PASSWORD=hackfest15group-9! +export OS_PROJECT_DOMAIN_NAME= +export OS_PROJECT_NAME=hackfest15group9 +export OS_REGION_NAME=RegionOne +export OS_TENANT_NAME=hackfest15group9 +export OS_USERNAME=hackfest15group9 +export OS_USER_DOMAIN_NAME= diff --git a/Hackfest_Demos/OSM-15/setup_scripts/osm-cloud-init.yaml b/Hackfest_Demos/OSM-15/setup_scripts/osm-cloud-init.yaml index 7384a54159517871cf09d02d62c09ab5a93ab1d9..80b6b7b62965910f754448a67795ace031d08158 100644 --- a/Hackfest_Demos/OSM-15/setup_scripts/osm-cloud-init.yaml +++ b/Hackfest_Demos/OSM-15/setup_scripts/osm-cloud-init.yaml @@ -2,16 +2,3 @@ password: hackfest chpasswd: { expire: False } ssh_pwauth: True - -write_files: -- path: /etc/netplan/99-default-route.yaml - owner: root:root - content: | - network: - version: 2 - ethernets: - ens4: - dhcp4-overrides: - use-routes: false -runcmd: -- reboot \ No newline at end of file diff --git a/Hackfest_Demos/OSM-15/setup_scripts/run-full-setup.sh b/Hackfest_Demos/OSM-15/setup_scripts/run-full-setup.sh index 0fdc763f16c29b2f686fdc2a350b19a7b883f5ee..4e9197008067f8efd98198d59f3d91767e93878d 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/run-full-setup.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/run-full-setup.sh @@ -5,8 +5,9 @@ echo $0 started at $(date) #./run-create-openstack-vm.sh $@ #./run-vm-initial-setup.sh $@ -./run-install-osm.sh $@ +#sleep 15 +#./run-install-osm.sh $@ wait -#./run-osm-vim-k8scluster-add.sh $@ +./run-osm-vim-k8scluster-add.sh $@ echo $0 $@ complete at $(date) \ No newline at end of file diff --git a/Hackfest_Demos/OSM-15/setup_scripts/run-install-osm.sh b/Hackfest_Demos/OSM-15/setup_scripts/run-install-osm.sh index e33cdbd705eb20d0a528e9fc89c7424222d058fd..31e781b56bdb81dc6125982ee30e883793f973bf 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/run-install-osm.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/run-install-osm.sh @@ -9,7 +9,9 @@ for PARTICIPANT in `seq ${START} ${MAX}` ; do IP=`openstack server list --name $VM_NAME --column Networks -f yaml | head -3 | tail -1 | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+'` echo $IP scp -o StrictHostKeyChecking=no -i hackfest_rsa ./vm-install-osm.sh ubuntu@${IP}: & - ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ./vm-install-osm.sh 2>&1 | tee -a logs/vm-install-osm-${PARTICIPANT}.log& + scp -o StrictHostKeyChecking=no -i hackfest_rsa ./bundle.yaml ubuntu@${IP}: & + sleep 10 + ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ". ~/vm-install-osm.sh" 2>&1 | tee -a logs/vm-install-osm-${PARTICIPANT}.log& done wait diff --git a/Hackfest_Demos/OSM-15/setup_scripts/run-osm-vim-k8scluster-add.sh b/Hackfest_Demos/OSM-15/setup_scripts/run-osm-vim-k8scluster-add.sh index 2114415bd05d78301284b7ca5205ac77c39c6d0a..80fbed22af68b4face2733011b726a77b6e1836f 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/run-osm-vim-k8scluster-add.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/run-osm-vim-k8scluster-add.sh @@ -31,8 +31,10 @@ EOF ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ". .profile;osm version" done scp -o StrictHostKeyChecking=no -i hackfest_rsa ${OS_USERNAME}.rc ubuntu@${IP}: & + scp -o StrictHostKeyChecking=no -i hackfest_rsa hackfest-k8s.yaml ubuntu@${IP}:~/kubeconfig.yaml & + sleep 10 ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ". .profile;osm vim-create --name openstack --user ${OS_USERNAME} --password ${OS_PASSWORD} --auth_url ${OS_AUTH_URL} --tenant ${OS_PROJECT_NAME} --account_type openstack --config=\"{ management_network_name: osm-ext, security_groups: default, insecure: true, project_domain_name: ${OS_PROJECT_DOMAIN_NAME}, user_domain_name: ${OS_USER_DOMAIN_NAME} }\"" 2>&1 | tee -a logs/osm-vim-k8scluster-add-${PARTICIPANT}.log - ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} '. .profile;osm k8scluster-add --creds hackfest-k8s.yaml --vim openstack --k8s-nets "{"net1": "osm-ext"}" --version 1.26 --namespace hackfest --description "Microk8s cluster" hackfest' 2>&1 | tee -a logs/osm-vim-k8scluster-add-${PARTICIPANT}.log + ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ". .profile;osm k8scluster-add --creds ~/kubeconfig.yaml --vim openstack --k8s-nets '{'net1': 'osm-ext'}' --version 1.26 --namespace hackfest --description 'Microk8s cluster' hackfest" 2>&1 | tee -a logs/osm-vim-k8scluster-add-${PARTICIPANT}.log ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} "echo . ~/${OS_USERNAME}.rc >> .bashrc" done diff --git a/Hackfest_Demos/OSM-15/setup_scripts/run-vm-initial-setup.sh b/Hackfest_Demos/OSM-15/setup_scripts/run-vm-initial-setup.sh index 61971f060394bbbf8d43d805ca5d71caca21f388..5e4646e19fe1cee5f8cc8a045635b453043e25a5 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/run-vm-initial-setup.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/run-vm-initial-setup.sh @@ -9,7 +9,9 @@ for PARTICIPANT in `seq ${START} ${MAX}` ; do IP=`openstack server list --name $VM_NAME --column Networks -f yaml | head -3 | tail -1 | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+'` echo $IP scp -o StrictHostKeyChecking=no -i hackfest_rsa ./vm-initial-setup.sh ubuntu@${IP}: & - ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ./vm-initial-setup.sh 2>&1 | tee -a logs/vm-initial-setup-${PARTICIPANT}.log & + scp -o StrictHostKeyChecking=no -i hackfest_rsa ./hackfest15admin.pub ubuntu@${IP}: & + sleep 10 + ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} ". ~/vm-initial-setup.sh" 2>&1 | tee -a logs/vm-initial-setup-${PARTICIPANT}.log & done wait diff --git a/Hackfest_Demos/OSM-15/setup_scripts/vm-initial-setup.sh b/Hackfest_Demos/OSM-15/setup_scripts/vm-initial-setup.sh index 26fe2e03e802235a96ab5bd6e81bfb44e74a9894..c58a643b5988b15e424956242fb8f771ae63306e 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/vm-initial-setup.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/vm-initial-setup.sh @@ -35,6 +35,12 @@ for MDG in common devops IM LCM MON N2VC NBI NG-SA NG-UI osmclient PLA POL RO te done popd +# Create directory for kubeconfig +mkdir $HOME/.kube + +# Add hackfest15admin public keys +cat ~/hackfest15admin.pub >> ~/.ssh/authorized_keys + # Export Module paths cat << 'EOF' > $HOME/osm-vars.sh export GIT_PATH=$HOME/OSM @@ -51,3 +57,5 @@ echo ". $HOME/osm-vars.sh" >> $HOME/.bashrc . $HOME/osm-vars.sh echo $0 $@ complete at $(date) + +sudo reboot diff --git a/Hackfest_Demos/OSM-15/setup_scripts/vm-install-osm.sh b/Hackfest_Demos/OSM-15/setup_scripts/vm-install-osm.sh index eba4e370b5df1c6c42ea15810edecb5eff04ae72..512203ece2698b3d99da709de9f69c1c7629cb32 100755 --- a/Hackfest_Demos/OSM-15/setup_scripts/vm-install-osm.sh +++ b/Hackfest_Demos/OSM-15/setup_scripts/vm-install-osm.sh @@ -15,35 +15,28 @@ plain-http = true EOF sudo systemctl restart snap.microk8s.daemon-containerd.service -sudo microk8s.enable storage +sudo microk8s.enable hostpath-storage +sudo usermod -a -G microk8s ubuntu +sudo chown -f -R ubuntu ~/.kube sudo snap alias microk8s.kubectl kubectl wget https://osm-download.etsi.org/ftp/osm-13.0-thirteen/install_osm.sh chmod +x ./install_osm.sh -./install_osm.sh --charmed -R testing-daily -t testing-daily -r testing -y 2>&1 | tee charmed_install_log.txt +./install_osm.sh --charmed --bundle ~/bundle.yaml -R testing-daily -t testing-daily -r testing -y 2>&1 | tee charmed_install_log.txt # Set our environment to talk to the new OSM grep '^export OSM' ~/charmed_install_log.txt >> ~/.bashrc +grep '^export OSM' ~/charmed_install_log.txt >> ~/.profile while [ 1 ] ; do - osm version + . .profile;osm version if [ $? -eq 0 ]; then break ; fi done - -# Expose our services -sudo sed -i "s/127.0.0.1 /127.0.0.1 nbi.osm ui.osm grafana.osm prometheus.osm /" /etc/hosts - -juju config -m osm grafana site_url=https://grafana.osm -juju config -m osm prometheus site_url=https://prometheus.osm -juju config -m osm nbi external-hostname=nbi.osm -juju config -m osm ng-ui external-hostname=ui.osm - -echo "export OSM_HOSTNAME=nbi.osm:443" >> .bashrc -echo "export OSM_HOSTNAME=nbi.osm:443" >> .profile -echo "export OSM_PASSWORD=hackfest" >> .bashrc -echo "export OSM_PASSWORD=hackfest" >> .profile +. .profile; osm user-update admin --password admin +echo "export OSM_PASSWORD=admin" >> .bashrc +echo "export OSM_PASSWORD=admin" >> .profile # Set some sane defaults for LXD lxc profile set default limits.memory 1GB