Oracle Javaone 2017 Get Started on Oracle Cloud: Java Apps with Containers and Devops Hands-On Labs (HOL)
Total Page:16
File Type:pdf, Size:1020Kb
Oracle JavaOne 2017 Get Started on Oracle Cloud: Java Apps with Containers and DevOps Hands-On Labs (HOL) Overview • This lab guides you through deploying and running the Blackjack Wed Service application "locally" via a Tomcat server that is spawned by NetBeans. • After successfully running the Blackjack application locally on the Oracle classroom machine, you will then place the application code on the Oracle Developer Cloud service by cloning your local Git repository to the cloud, where you then build, deploy, and run the application. • You also learn how to create an application archive of the Blackjack application that can be used to deploy the application on the cloud. Learning Objectives In this Hands-On Lab session, you will learn how to: • Configure, build, deploy, and run the Blackjack application locally • Generate deployable archive files of the Blackjack application for deployment on the cloud • Create a new project in the Developer Cloud Service • Create and clone a Git repository in the Developer Cloud Service • Build the Blackjack application in the Developer Cloud Service • Deploy the Blackjack application from the Developer Cloud Service onto the Application Container Service • Test the deployed Blackjack application that is running on the Application Container Service Prerequisites • Ensure that you have a working Oracle Cloud account that you can access • Successfully establish a VNC connection to a VM environment that has been supplied for you Lab Environment You will do the labs on a VM that has been provided to you. Note: All necessary installations and configurations of software have been done in the VM. If wish to do the practices on your laptop, you will need to do the installs and configurations of the software. The following software has been installed software on the VM: • JDK - Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. o It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development. • Netbeans - A software development platform written in Java. o Applications are developed from a set of modular software components called modules. Used for development in Java, PHP, C/C++, and HTML5 • GIT - Open source version control system (VCS) for tracking changes in computer files • Maven - Apache Maven is a software project management tool. o Describes how software was built, and it describes its dependencies • Notepadd++ - A text editor and source code editor. It supports tabbed editing, which allows working with multiple open files in a single window. Lab Files On the Desktop of the VM is the HOL lab files directory. It contains files you will use in the labs. • Blackjack.zip • Helloworld-Example.zip • Pom.xml Understanding DevOps and Containers Before you get started, take a few moments to familiarize yourself with DevOps and Container, and the two Oracle services, Oracle Developer Cloud Service and Oracle Application Container Service you will use in the HOL lab. What is DevOps? DevOps (development and operations) is an enterprise software development phrase used to mean a type of agile relationship between development and IT operations. The goal of DevOps is to change and improve the relationship by advocating better communication and collaboration between these two business units. Oracle Developer Cloud Service integrates with popular IDEs, including Eclipse, Oracle JDeveloper, and NetBeans. IDE users can develop and commit code through Git integration tools, work with tasks and defects through Mylyn integration, monitor builds, and more. The key cloud services are Oracle Developer Cloud Service (DevOps and collaboration), Oracle Application Container Cloud (polyglot microservices), Oracle API Platform Cloud Service (API management), Oracle Container Cloud Service (Docker), Oracle Mobile Cloud Service (mobile), and Oracle Management Cloud (application performance monitoring and log analytics). Oracle Developer Cloud Service (ODCS) Oracle Developer Cloud Service is a software development Platform as a Service (PaaS). As part of Oracle Cloud, Oracle Developer Cloud Service simplifies development with an automatically provisioned, scalable development platform supporting the complete development lifecycle. Within minutes, you and your team have immediate access to source repositories, issue tracking, builds, and more. Oracle Developer Cloud Service has these key features: • Project configuration and user management • Source control repositories through Git and Maven • A defect tracking system to track tasks, bugs, and enhancements • Continuous build integration through Hudson • Document collaboration through wiki The web interface provides project creation and management, a dashboard to display the latest activity and build status, an issue tracking interface to edit and query defects and tasks, a wiki interface to write project documentation, a Hudson view to manage builds, and a Team view to configure teams and define roles. Oracle Developer Cloud Service also integrates into popular IDEs, including Eclipse, JDeveloper, and NetBeans. IDE users can develop and commit code through Git integration tools, work with Tasks and Defects through Mylyn integration, monitor builds, and more. Oracle Developer Cloud Service also provides an SSH access to interact with the hosted Git repositories. Oracle Developer Cloud Service provides tight integration with Java Cloud Service. You can manually deploy application build results from Hudson to your Java Service instance, or you can configure continuous deployment. In addition, you can deploy build results to your on premise production environment. What is Container? Containers or virtual environments running on a containerization host run the same version of the OS. Unlike a hypervisor, which runs Virtual Machines, you need a host operating system to run containers or a containerization platform, such as LXC with Docker. LXC (Linux Containers) is an operating-system- level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. A Docker image contains everything that is needed to run your software: the code, a runtime (e.g. the JVM), drivers, tools, scripts, libraries, deployments, etc. Oracle Cloud Infrastructure Container Service Classic provides an easy and quick way to create an enterprise-grade container infrastructure. It provides you the tools to compose, deploy, orchestrate, and manage Docker container-based applications on Oracle Cloud Infrastructure for Dev, Dev/Test, DevOps, and Cloud Native use cases. It consists of Oracle Container Cloud Service and Oracle Application Container Service Container Service Classic Oracle Container Service Classic provides an easy and quick way to create an enterprise-grade container infrastructure. It delivers comprehensive tooling to compose, deploy, orchestrate, and manage Docker container-based applications on Oracle Cloud Infrastructure for Dev, Dev/Test, DevOps, and Cloud Native use cases. Oracle Application Container Cloud Service (OACCS) OACCS includes Oracle Java SE Cloud Service, which lets you deploy Java applications to the Oracle Cloud, and Oracle Node Cloud Service, which lets you deploy Node.js applications to the Oracle Cloud. You can also deploy PHP applications. When you deploy your application, you specify whether it’s a Node.js, Java, or PHP application. Subscribing to Oracle Application Container Cloud Service makes all types available when you deploy. Your application runs in "https://www.docker.com/what-docker" target="_blank">Docker container. Oracle Application Container Cloud Service has these key features: • A pre-configured environment for Java, Node.js, and PHP applications. • Java SE advanced features such as Java Flight Recorder, Java Mission Control, advanced memory management, and ongoing and timely security updates. • Open platform that supports all Java frameworks and containers such as Spring, Play, Tomcat, and Jersey. • Support for Java Virtual Machine (JVM) based languages such as JRuby. You can run any language that uses the Java Virtual Machine on this service. • Enterprise-grade support from Oracle. • Web-based user interface and REST API. Oracle Application Container Service (ACCS) provides a simple platform for hosting Java SE, Node.js, PHP and recently Python applications. In addition, you can choose to integrate with other Oracle Cloud services. You can develop your application on your local system, or you can use Oracle Developer Cloud Service. With Oracle Container Service Classic, you have a Container Cloud service where you are upload the Docker image with whatever you want inside, and the service will provide the infrastructure to run the Docker containers for you. With Oracle Application Container you can upload a ZIP file containing the application, and the service will provide the runtime for you, using Docker. Think of Oracle Application Container as a layer above Oracle Container Service Classic. Understanding the environment for Building and Deploying Applications with Oracle Developer Cloud Service and Application Container