Upload
craig-trim
View
3.674
Download
1
Tags:
Embed Size (px)
Citation preview
Deploying on BluemixCloud Foundry / Java Web App
This is not an official IBM position. The views expressed are solely my own.
Create the Web App• Simple JAX-RS Web app
• Given a URL in this format• <host:port>/blog/rest/get?
name=Craig
• Return a result on the screen
• The structure of the web app is explained here:• http://
trimc-jee.blogspot.com/2015/01/an-introduction-to-java-api-for-restful.html
Configure a build script• It’s going to be easier if we put our
Maven build configuration into a shell script that can be called during the CF deployment process
• My script is simple:• mvn clean install
• Remember to make your script executable• chmod +x <script>
• Make sure the script works locally first
Configure a deployment script• The ${CF_APP} env variable is passed in
automatically
• Specify the manifest we created on the prior slide
Check your code into the Jazz Hub• http://
www.slideshare.net/CraigTrim/ibm-bluemix-creating-a-git-project
• http://www.slideshare.net/CraigTrim/ibm-bluemix-building-a-project-with-maven
Configure the Deploy Job• Just invoke the two scripts we previously
created
• There is nothing to prevent us from doing deep scripting within this web window
• But it’s easer to work with external files
• It’s likely I’ll only have to configure this web dialog once
Deploy: Not yet run• Here’s my pipeline
• Let’s go ahead and run the deployment and see what happens …
• The stage can be manually invoked by clicking the arrow in the upper right
Deploy: Running• This is a running log file; scroll down to
view the input as the system invokes both Maven and (if the build is successful) proceeds to perform a Cloud Foundry deployment