Develop Cloud Applications for OpenStack on Murano, Day 5: Uploading and troubleshooting the app

The post Develop Cloud Applications for OpenStack on Murano, Day 5: Uploading and troubleshooting the app appeared first on Mirantis | The Pure Play OpenStack Company.
We&;re in the home stretch! So far, we’ve explained what Murano is, created an OpenStack cluster with Murano, built the main script that will install our application, and packaged it as a Murano app. We&8217;re finally ready to deploy the app to Murano.
Now let’s upload the PloneServerApp package to Murano.
Add the Murano app to the OpenStack Application Catalog
To upload an application to the cloud:

Log into the OpenStack Horizon dashboard.
Navigate to Applications > Manage > Packages.
Click the Import Package button.

Select the zip package that we created yesterday and click Next.
In the pop-up window you can see the information that we added to the manifest.yaml file earlier. Also, we’ve got a notification message that Glance has started retrieving Ubuntu image mentioned in image.lst.  (This only happens if the image doesn&8217;t already exist in Glance.)

Now we just have to wait for the image to finish saving so we can move on to try out the app.  To check on that, go to Projects > Images. Wait for the status to be listed as Active rather than Saving.

Deploy the new app
Now that we&8217;ve created the app, it&8217;s time to test it out in all its glory.

Navigate to Applications > Catalog > Browse.

You will find that the Plone Server has appeared with the icon from our logo.png file. Click Quick deploy and you’ll see the configuration wizard appear, with all of the information we added to the ui.yaml file in the appConfiguration form:

Click on Assign Floating IP and click Next.
You’ll then see the instanceConfiguration form we mentioned in the ui.yaml file:

Choose an appropriate instance flavor. In my case I used a “m1.small” flavor and edited it to have: 1 CPU, 1GB RAM, and 20GB disk space. I also, shut down the Compute node VM and gave it more RAM in VirtualBox, with 2GB instead of 1GB. You can edit flavors by navigating from Admin > System > Flavors.
Be aware: that if you select a flavor that requires more hardware than your Compute node really has then you take an error during spawning an instance.
Choose the instance image that we mentioned in image.lst. If no images appear in the drop-down menu check that your image has finished uploading.
Choose a Key Pair or import it instantly by clicking the “+” button:

Click Next.
Set the Application Name and click Create:

The Plone Server application has now been successfully added to the newly created quick-env-1 environment. Click the Deploy This Environment button to start the deployment:

It may take some time for the environment to deploy:

Wait until the status has changed from Deploying to Ready:

Once it does, go to the Plone home page at http://172.16.0.134:8080 from your Host OS browser, this is, outside your OpenStack Cloud:

You should see the Plone home page. If you don&8217;t, you&8217;ll need to do some troubleshooting.
Debugging and Troubleshooting Your Murano App
While deploying your Murano App you may have encountered a number of errors. Some of them could be related to spawning a VM, others may have occured during runDeployPlone.sh execution.
For information on errors relating to spawning the VM, check the Horizon UI. Navigate Catalog > Environments then click the environment and open the Deployment History page. Click on the Show Details button located at the corresponding deployment row of the table and then go to the Logs tab. From there you can see the steps of deployment and ones that have failed will have a red color.
Several of the most frequently occurring errors, as well as their suggested solutions, are described in  Murano documentation.
The other type of errors relates to the app installing script runDeployPlone.sh. As you remember, we collect all output from this file in a special log-file, /var/log/runPloneDeploy.log to help you track any possible issues. By knowing the floating IP-address of the newly created VM for the Plone Server, we can access the log-file via an ssh-connection.
It&8217;s important to note, though, that because we applied a special Ubuntu image from the repository during the environment deployment, the login process has a security limitation. By default, the password authentication mechanism is turned off and the only way to connect to your VM is to use an access key pair. You can find out more about how to create and set this up here.
First log in to the VM as the default user, ubuntu:
$ ssh -i <private_key> ubuntu@<floating IP address>
You can then read the log:
$ less /var/log/runPloneDeploy.log
Now it’s possible to fix the errors that have appeared and polish the installation process.
Remember, when encountering issues with your Murano App, you can always contact the Murano team, or any other OpenStack related teams, through IRC. You can find the list of IRC channels here: IRC. Feel free to ask any questions.
Summary
In this series, we outlined the creation process of a Murano App for the ultimate enterprise CMS &; Plone. We also saw how to easily build a Murano App from the ground up and showed how it didn’t require you to be an OpenStack or Linux guru.
Murano is a great OpenStack service that provides application lifecycle management and dramatically simplifies the introduction of new software to the OpenStack community.
Moreover, it provides other great features not mentioned in this tutorial, such as High-Availability mode, Auto-Scaling or application dependencies management.
Try it out for yourself and get excited by how easy it is. Next time, we&8217;ll look at the steps needed to publish your Murano App in the OpenStack application catalog at http://apps.openstack.org.
Thanks for joining us!
The post Develop Cloud Applications for OpenStack on Murano, Day 5: Uploading and troubleshooting the app appeared first on Mirantis | The Pure Play OpenStack Company.
Quelle: Mirantis

Published by