#install the packages needed
sudo apt-add-repository ppa:juju/stable -y
sudo apt-add-repository ppa:maas/stable -y
-sudo apt-add-repository cloud-archive:newton -y
+sudo apt-add-repository cloud-archive:ocata -y
sudo apt-get update -y
#sudo apt-get dist-upgrade -y
sudo apt-get install bridge-utils openssh-server bzr git virtinst qemu-kvm libvirt-bin juju \
fi
sudo virt-install --connect qemu:///system --name bootstrap --ram 4098 --cpu host --vcpus 2 --video \
- cirrus --arch x86_64 --disk size=20,format=qcow2,bus=virtio,io=native,pool=default \
+ cirrus --arch x86_64 --disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
$netw --boot network,hd,menu=off --noautoconsole \
--vnc --print-xml | tee bootstrap
NODE_NAME=`cat labconfig.json | jq ".lab.racks[].nodes[$units].name" | cut -d \" -f 2 `
sudo virt-install --connect qemu:///system --name $NODE_NAME --ram 8192 --cpu host --vcpus 4 \
- --disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
+ --disk size=120,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
$netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee $NODE_NAME
nodemac=`grep "mac address" $NODE_NAME | head -1 | cut -d '"' -f 2`
opnfvsdn=nosdn
opnfvtype=nonha
-openstack=newton
+openstack=ocata
opnfvlab=default
-opnfvrel=d
+opnfvrel=e
opnfvfeature=none
opnfvdistro=xenial
opnfvarch=amd64
if [[ -z "$node_id" ]]; then
sudo virt-install --connect qemu:///system --name $node \
--ram 8192 --cpu host --vcpus 4 \
- --disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
+ --disk size=120,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
--network bridge=virbr0,model=virtio \
--network bridge=virbr0,model=virtio \
--boot network,hd,menu=off \
echo " MAAS not deployed please deploy MAAS first."
fi
fi
+#create json file which is missing in case of new deployment after maas and git tree cloned freshly.
+
+ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < labconfig.yaml > labconfig.json
+ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < deployconfig.yaml > deployconfig.json
+
else
if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then
cp ~/.juju/environments.yaml ./environments.yaml
adminPasswd=$(juju config keystone | grep admin-password -A 5 | grep value | awk '{print $2}' 2> /dev/null)
fi
- configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v2.0 RegionOne > ~/joid_config/admin-openrc
+ configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne > ~/joid_config/admin-openrc
+
chmod 0600 ~/joid_config/admin-openrc
}
configOpenrc() {
-if [ "$API_FQDN" != "None" ]; then
- cat <<-EOF
- export SERVICE_ENDPOINT=$4
- unset SERVICE_TOKEN
- unset SERVICE_ENDPOINT
- export OS_USERNAME=$1
- export OS_PASSWORD=$2
- export OS_TENANT_NAME=$3
- export OS_AUTH_URL=$4
- export OS_REGION_NAME=$5
- export OS_ENDPOINT_TYPE='internalURL'
- export CINDER_ENDPOINT_TYPE='internalURL'
- export GLANCE_ENDPOINT_TYPE='internalURL'
- export KEYSTONE_ENDPOINT_TYPE='internalURL'
- export NEUTRON_ENDPOINT_TYPE='internalURL'
- export NOVA_ENDPOINT_TYPE='internalURL'
-EOF
-else
- cat <<-EOF
- export SERVICE_ENDPOINT=$4
- unset SERVICE_TOKEN
- unset SERVICE_ENDPOINT
- export OS_USERNAME=$1
- export OS_PASSWORD=$2
- export OS_TENANT_NAME=$3
- export OS_AUTH_URL=$4
- export OS_REGION_NAME=$5
+cat <<-EOF
+export OS_AUTH_URL=$4
+export OS_USERNAME=$1
+export OS_PASSWORD=$2
+export OS_USER_DOMAIN_NAME=admin_domain
+export OS_PROJECT_DOMAIN_NAME=admin_domain
+export OS_PROJECT_NAME=$3
+export OS_TENANT_NAME=$3
+export OS_REGION_NAME=$5
+export OS_IDENTITY_API_VERSION=3
+# Swift needs this:
+export OS_AUTH_VERSION=3
EOF
-
-fi
}
if [ "$API_FQDN" != "None" ]; then
--name ext-subnet --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
--disable-dhcp --gateway $EXTNET_GW $EXTNET_NET
+#congress team is not updating and supporting charm anymore so defer it.
+
# Create Congress datasources
-sudo apt-get install -y python-congressclient
-
-openstack congress datasource create nova "nova" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
-openstack congress datasource create neutronv2 "neutronv2" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
-openstack congress datasource create ceilometer "ceilometer" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
-openstack congress datasource create cinder "cinder" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
-openstack congress datasource create glancev2 "glancev2" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
-openstack congress datasource create keystone "keystone" \
- --config username=$OS_USERNAME \
- --config tenant_name=$OS_TENANT_NAME \
- --config password=$OS_PASSWORD \
- --config auth_url=http://$keystoneIp:5000/v2.0
+#sudo apt-get install -y python-congressclient
+
+#openstack congress datasource create nova "nova" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0
+#openstack congress datasource create neutronv2 "neutronv2" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0
+#openstack congress datasource create ceilometer "ceilometer" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0
+#openstack congress datasource create cinder "cinder" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0
+#openstack congress datasource create glancev2 "glancev2" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0
+#openstack congress datasource create keystone "keystone" \
+# --config username=$OS_USERNAME \
+# --config tenant_name=$OS_TENANT_NAME \
+# --config password=$OS_PASSWORD \
+# --config auth_url=http://$keystoneIp:5000/v2.0