diff --git a/images_configurations.py b/images_configurations.py index 1b91399..e7edf92 100644 --- a/images_configurations.py +++ b/images_configurations.py @@ -32,15 +32,28 @@ sed -i "s/${PUBLIC_IP}/${EXTERNAL_IP}/g" /etc/ssl/openssl.cnf sed -i "s/${PUBLIC_IP}/${EXTERNAL_IP}/g" /etc/icinga2/features-enabled/graphite.conf -# Format the new attached disk for storing the metrics -(echo n; echo p; echo 1; echo ; echo; echo w) | fdisk /dev/vdb -mkfs.ext4 /dev/vdb1 - -# Add the new partition to be automounted on reboot -sed -i "\$a/dev/vdb1 /data ext4 defaults 0 0" /etc/fstab - -# Mount the partition -mount -a +mkdir -p /data/elasticsearch +mkdir -p /data/graphite +chown -R elasticsearch.elasticsearch /data/elasticsearch +chown -R _graphite._graphite /data/graphite + +# Restart all services +service mysql restart +service carbon-cache restart +service collectd restart +service elasticsearch restart +service kibana4 restart + + +# # Format the new attached disk for storing the metrics +# (echo n; echo p; echo 1; echo ; echo; echo w) | fdisk /dev/vdb +# mkfs.ext4 /dev/vdb1 +# +# # Add the new partition to be automounted on reboot +# sed -i "\$a/dev/vdb1 /data ext4 defaults 0 0" /etc/fstab +# +# # Mount the partition +# mount -a reboot """ @@ -160,7 +173,7 @@ sed -i "s/${OPENSTACK_PASSWORD_DEFAULT}/${OPENSTACK_PASSWORD}/g" /etc/nubomedia/paas.properties sed -i "s/${OPENSTACK_TENANT_DEFAULT}/${OPENSTACK_TENANT}/g" /etc/nubomedia/paas.properties sed -i "s/${OPENSTACK_KEY_PAIR_DEFAULT}/${OPENSTACK_KEY_PAIR}/g" /etc/nubomedia/paas.properties -sed -i "s/${NUBOMEDIA_DEFAULT_ADMIN_PASS}/${NUBOMEDIA_DEFAULT_ADMIN_PASS}/g" /etc/nubomedia/paas.properties +sed -i "s/${NUBOMEDIA_DEFAULT_ADMIN_PASS_DEFAULT}/${NUBOMEDIA_DEFAULT_ADMIN_PASS}/g" /etc/nubomedia/paas.properties sed -i "s/${KURENTO_MEDIA_SERVER_DEFAULT}/${KURENTO_MEDIA_SERVER}/g" /etc/nubomedia/paas.properties # Hardcoded values that need to be updated on the NUBOMEDIA PaaS backend diff --git a/index.md b/index.md index 3d0b7f8..22fb723 100644 --- a/index.md +++ b/index.md @@ -52,8 +52,13 @@ For authentication you should either define the *master_pass* as a string variab floating_ip_pool = 'external' private_key = 'private_key_for_accesssing_instances' openshift_ip = 'x.x.x.x' +openshift_keystore = keystore +openshift_token = xyxyxyxyxyx +openshift_domain = apps.example.com ``` -You should define the floating (public) IP pool name for the OpenStack. +You should generate the OpenShift token using the details found here : https://docs.openshift.com/enterprise/3.1/rest_api/index.html#rest-api-serviceaccount-tokens +The openshift_domain name should be having a wildcard DNS entry pointing to the OpenShift public IP. +You should also define the floating (public) IP pool name for the OpenStack. It is best to also add a public key on the OpenStack tenant you want to deploy NUBOMEDIA and then add the private key file to the autonomous-installer directory in order to allow it to customize the instances after deployment. *x.x.x.x* represents the public IP address of the OpenShift PaaS. diff --git a/main.py b/main.py index 691a2a3..c7085c8 100644 --- a/main.py +++ b/main.py @@ -484,7 +484,7 @@ def autoinstall(): # Connect to Cinder and create disk cinderManager = CinderManager(**kwargs) cinderManager.get_volumes_list() - monitoring_disk = cinderManager.create_volume("monitoring_disk", 10) + # monitoring_disk = cinderManager.create_volume("monitoring_disk", 10) # Create a floating IP if there is no floating IP on that tenant print novaManager.create_floating_ip() @@ -567,16 +567,15 @@ def autoinstall(): instance_monitoring_ip) # Start TURN Server instance - # instance_turn = novaManager.start_kvm_instance(turn_image_name, - # glanceManager.get_image_id(turn_image_name), - # novaManager.get_flavor_id(turn_flavor), - # private_key, - # turn_user_data) - # instance_turn_ip = novaManager.associate_floating_ip(instance_turn) - # print "TURN instance name=%s , id=%s , public_ip=%s" % (turn_image_name, - # instance_turn, - # instance_turn_ip) - instance_turn_ip = '80.96.122.61' + instance_turn = novaManager.start_kvm_instance(turn_image_name, + glanceManager.get_image_id(turn_image_name), + novaManager.get_flavor_id(turn_flavor), + private_key, + turn_user_data) + instance_turn_ip = novaManager.associate_floating_ip(instance_turn) + print "TURN instance name=%s , id=%s , public_ip=%s" % (turn_image_name, + instance_turn, + instance_turn_ip) # Start Controller instance instance_controller = novaManager.start_kvm_instance(controller_image_name, @@ -603,7 +602,7 @@ def autoinstall(): # properly provisioned and booted time.sleep(240) - cinderManager.attach_volume(monitoring_disk, instance_monitoring, '/dev/vdb') + # cinderManager.attach_volume(monitoring_disk, instance_monitoring, '/dev/vdb') # Delay for allowing the volume to get attached to the monitoring instance time.sleep(60) @@ -611,7 +610,7 @@ def autoinstall(): nubomediaManager.run_user_data(instance_monitoring_ip, "ubuntu", private_key, monitoring_user_data) # Configure the TURN server instance - # nubomediaManager.run_user_data(instance_turn_ip, "ubuntu", private_key, turn_user_data) + nubomediaManager.run_user_data(instance_turn_ip, "ubuntu", private_key, turn_user_data) # Configuring the Controller instance # Upload the OpenShift Keystore first diff --git a/variables-example.py b/variables-example.py index 5c8584f..f54446b 100644 --- a/variables-example.py +++ b/variables-example.py @@ -28,6 +28,6 @@ # OpenShift Keystore that should be generated using the Portacle tool from http://portecle.sourceforge.net/ openshift_keystore = 'openshift-keystore' openshift_domain = 'apps.nubomedia-paas.eu' - +openshift_token = 'oimqwoi29m31290xmu23904u2390z432mu90z432m90432mu90z42mz29031209z3m190z3n128...' nubomedia_admin_paas = 'nubomediapaas' use_kurento_on_docker = False