Skip navigation

In the May Update, Developer Cloud Service adds over 30 new features including; a new top-level feature to track Releases, tools to provision Oracle Cloud services in Builds, new webhooks for external build systems, enhancements to Agile tools, and language aware Code Search.

 

Software Releases

 

Organize Developer Cloud Service project artifacts into software releases through the new top level Releases feature. Releases can associate git repositories, branches, and tags, Maven artifacts, build artifacts, wiki pages, and more. Using releases makes it easy to track the progress, version, clone, and distribute related artifacts.

 

Screen Shot 2017-05-08 at 9.15.00 AM.png

 

PSMcli Tools in Build

 

Oracle PaaS Service Manager (PSM) provides a command line interface (CLI) with which you can manage the lifecycle of various services in Oracle Public Cloud. The PSMcli is now integrated into the DevCS build tools which enables you to incorporate new administrative and provisioning operations for Oracle PaaS services into your build pipelines. The PSMcli build plugin also allows you to use Oracle Stack Manager. More interesting end to end build pipeline flows are possible through PSM such as; checkout a stack template file from git, provision a stack consisting of JCS and Database, compile the application code, deploy the app code to the new stack, run tests, tear down the stack environment.

 

Epics and User Stories in Agile

 

Epics and User Stories are now supported as Issue types and tracked appropriately in Agile Sprints and Burndown Charts.

 

Webhooks for External Jenkins & Hudson

 

Enhanced webhooks for external Jenkins and Hudson now support both inbound and outbound communication from Developer Cloud Service projects. Configure outbound git  triggers to invoke build jobs on external Jenkins servers. Setup inbound notifications from Jenkins or Hudson so that build statuses are properly reflected in the Project Activity Stream.

 

Smart Code Search

 

Code searching is now language aware for multiple languages including; Java, JavaScript, Node.js, HTML, and CSS. Browsing individual files in the Code tab provides navigation shortcuts, based on semantics of the language, to quick jump to appropriate dependencies. Customize code search granularity to run broadly across entire repositories or narrow down the scope to individual commits.  Use auto-suggest to more quickly construct the right code query.

Screen Shot 2017-05-08 at 9.17.32 AM.png

 

Additional information on new features can be found in the What's New document. Tutorials, examples, and feature documentation can be found in the Developer Cloud Service Documentation.

This blog will provide an understanding of how the Maven plugin enhancement in Oracle Developer Cloud Service could let you access the Oracle Maven repository, thus simplifying build and deployment of SOA composites on Oracle SOA Cloud Service.

Note: The scope of the blog does not cover how to develop a SOA composite.

 

Tech Stack Usage:

Oracle Developer Cloud Service

Oracle SOA Cloud Service with SOA version 12.1.3

Jdeveloper 12.1.3

Maven 3.3.9

 

All local installations are done on Microsoft Windows7

 

Setting up the SOA Development environment in brief:

To install using Jdeveloper 12.1.3 with SOA plugin locally on your machine you will have to use

“Oracle SOA Suite 12.1.3 Quick Start Download”. Below is the link that can be used to download the SOA quick start installer version 12.1.3.

http://www.oracle.com/technetwork/middleware/soasuite/downloads/soa1213qsdownload-2769533.html

 

2016-11-17 12_52_29-SOA Suite 12.1.3 QuickStart download.png

 

This will install Jdeveloper 12.1.3, SOA 12.1.3 plugin and integrated Weblogic server with SOA libraries which will enable you to develop, deploy and test the SOA application locally using the integrated Weblogic server. You can follow the below documentation for the quick start setup.

https://docs.oracle.com/middleware/1213/core/SOAQS/integrated.htm#SOAQS206

 

Note: Having Jdeveloper 12.1.3 and then trying to install SOA plugin from the updates does not work anymore.

 

 

Installing Maven on your machine for local testing:

You will have to download the Binary Zip archive from the Maven website using the URL as given below:

http://maven.apache.org/download.cgi

2016-11-17 13_01_45-Maven – Download Apache Maven.png

 

You would have to unzip the maven binary zip download from the above site. When using Windows(as I have used for this blog), ensure that the jdk1.7 or greater and maven(downloaded and unzipped) bin directory file paths are set in the PATH environment variable. Also the JAVA_HOME variable should be set as well. Please use the below link to get more details on maven setup.

http://maven.apache.org/install.html

 

 

Oracle Cloud Service Setup

 

Developer Cloud Service:

You need to create a project and create an empty Git repository where the SOA application code needs to be checked in or pushed as shown in the screenshot below.

2017-03-31 19_13_19-Home _ KafkaProject - Oracle Developer Cloud Service.png

SOA Cloud Service

 

You would also have to create a SOA cluster instance in the SOA cloud service. Post creation of the instance, you will be able to see the instance listed on the page. As, it can be seen in the screen shot below. Make sure that, you take a note of the username and password that you provide for the Weblogic server instance while creating the SOA cluster instance.

2017-03-31 14_35_51-Oracle SOA Cloud Service Details.png

 

Click on the instance name to see the details. Note the public IP address shown for your instance. For the one I am using it is: 129.144.19.222.

2017-03-31 14_38_06-.png

 

Jdeveloper Setup:

 

Post SOA quick start installation, Jdeveloper 12.1.3 will be installed on your machine. Select the SOA application from the new application template as depicted in the consecutive two screenshots below.

2016-11-17 14_34_41-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png2016-11-17 13_53_02-New Gallery.png

 

You can use the below given blog link as a reference for using the Git repository for the Developer cloud service that we had setup, to check in SOA application code in Jdeveloper.

https://blogs.oracle.com/shay/entry/using_the_oracle_developer_cloud

 

 

SOA Application Changes for Maven Build:

 

There are two POM files (considering you are creating one SOA composite for now) in the ‘SOAServiceAppl’ application. One is at the Application folder level. And another is at the composite project level. In case of multiple composites, there would be one pom file for each composite. The POM file which is at the application folder level is the parent POM file which lists the composite modules that are part of the application and need to be build. Below is the screen shot that shows the SOA application project structure.

2017-03-30 21_29_09-Oracle JDeveloper 12c - SOAServiceAppl.jws _ MessageService.jpr.png

Highlighted entries need to be added to the Application level POM file to ensure that it first accesses the Oracle Developer Cloud Project maven repository for the build. The highlighted entry in the below screenshot needs to be added after the ‘modules’ tag. The repository name mentioned here will be the one you would have to configure in the Developer Cloud interface, described further in the blog. The repository URL is https://maven .oracle.com.

2017-03-31 19_22_01-Oracle JDeveloper 12c - SOAServiceAppl.jws _ MessageService.jpr _ D__WorkSpaces_.png

 

In the composite project (in the project structure the project name is Service) level POM the sar location needs to be appended with -SNAPSHOT.jar, as highlighted in the screenshot below. We will also have to add the Oracle maven repository entries as we had done for the previous application level POM described above.

 

2017-03-31 19_26_29-Oracle JDeveloper 12c - SOAServiceAppl.jws _ MessageService.jpr _ D__WorkSpaces_.png

 

2017-03-31 19_29_06-Oracle JDeveloper 12c - SOAServiceAppl.jws _ MessageService.jpr _ D__WorkSpaces_.png

 

Creating a Build Job on Developer Cloud Service for the maven build:

 

Maven Repository Configuration

In my previous blog on SOACS deployment from Developer Cloud Service, we had used the maven sync plugin to sync the local (where Jdeveloper is installed) Maven repository to the Developer Cloud Service project Maven Repository. Then the builds were using the Developer Cloud Service Maven repository for the build executions.

With the Maven plugin enhancement in the Developer Cloud service we can give this step a miss. We can now use the interface provided in Oracle Developer Cloud, which would enable us to, configure https://maven.oracle.com credentials and use the same as the maven repository for the builds. You will find these configuration in the environment tab.

Below screen shot shows the maven configuration in Developer Cloud Service:

2017-03-31 15_58_53-Build_ KafkaProject - Oracle Developer Cloud Service.png

 

The credentials are the OTN username and password that will be used to authenticate the user for https://maven.oracle.com. The ServerId has to be same as the one mentioned in the pom files in the SOA Composite application as repository names.

 

Build Parameters

Both the build and deploy of the composite in developer Cloud Service will be done by the maven build, there is no separate deployment configuration that needs to be done in the Developer Cloud service.

You will have to set four build parameters, as mentioned below:

  1. serverUrl http://<public ip of the SOA instance>:80
  2. user – username set for the Weblogic server while creating the SOA instance
  3. password – password set for the Weblogic server while creating the SOA instance.
  4. middlewareHome - opt/Oracle/Middleware/SOA

 

Note: The server url which is composed of the public IP of the SOACS instance, which can be retrieved from the SOACS service console by selecting the instance to be used for deployment.

Below are the screenshots showing the build configuration and message output post maven goal execution

 

2017-03-31 16_05_37-Build_ KafkaProject - Oracle Developer Cloud Service.png

 

 

Give a name to the build job and leave the JDK selected in the drop down as default.

2017-04-04 22_32_47-Build_ BlogProject - Oracle Developer Cloud Service.png

Select the Git repository that you have created.

2017-03-31 16_03_49-Build_ KafkaProject - Oracle Developer Cloud Service.png

 

Add ‘Invoke Maven 3’ build step. Also, make sure to add the proxy settings in the ‘Properties’ box, as shown below in the screenshot.

2017-04-04 22_39_11-Build_ BlogProject - Oracle Developer Cloud Service.png

 

The console would show the downloading of the artifacts from https://maven.oracle.com.

project_build.png

On completion of sar file compilation you should see a ‘SOA COMPILE DONE’ message on the console, as in the screenshot below.

compile.png

On completion of the deployment of the composite on the SOA Cloud Service instance given as build parameter, you should see a ‘Deploying composite success’ message on the console.

deployment.png

 

For unit testing you would have to include the jndi properties file and ports have to be enabled for tunneling in Weblogic. This portion is beyond the scope of the blog.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

Johan Louwers shares a how-to on his blog showing you how to connect Oracle Developer Cloud Service to send notification to the popular Slack collaboration tool.

Check the detailed steps here.

Oracle_Cloud_slack_integration_3.png

You can use similar steps to hook DevCS to other collaboration services such as hipchat and Oracle Social Network.

More in the documantation.

We came across a use case where the Oracle Developer Cloud Service was being used to build a zip archive and then the requirement was to upload this zip file on GitHub from Developer Cloud Service for a public usage. This blog will help you understand how to push an artifact generated on Developer Cloud to GitHub repository.

 

 

 

Prerequisites for GitHub:

  1. To have a valid GitHub account.
  2. Have created a GitHub repository, where you would like to push the artifact to.
  3. The user, whose credentials are being used, has write permission for the repository.

 

Prerequisites for Developer Cloud:

  1. A build job which generates an artifact such as zip/jar/war etc.
  2. The below script has to be part of the same build job which generates the artifact to be pushed.

 

Build Job Configuration:

Select Execute Shell from the ‘Add Build Step’ dropdown in the Build Steps tab of the build job. This is where you would have to add the below given script.

 

Script to upload generated artifact on GitHub:

cd EmployeeService
git init
git config --global http.postBuffer 12M
git add employeeservice.zip
git commit -m "Initial Commit"
git remote add github https://<GitHub_username>:< GitHub_password>@github.com/ <GitHub_username >/<GitHub_repository_name>.git

git push github master

 

 

Explanation of the Script:

cd EmployeeService - To change the directory, to the root folder where the artifact gets generated.

git init – Initialize Git
git config --global http.postBuffer 12M – Set the Git buffer
git add employeeservice.zip – Add the artifact to be pushed to GitHub
git commit -m "Initial Commit" – Commits and sets the message
git remote add github https://<GitHub_username>:< GitHub_password>@github.com/ <GitHub_username >/<GitHub_repository_name>.git –

To add the Git repository by forming a URL which consist of Github_username, GitHub password and Git repository name.
git push github master – To push the artifact on GitHub repository in the master branch

 

Make sure the anatomy of the GitHub repository URL is as described above, for smooth execution.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

Spark is a Java based framework supporting development of micro applications/services. This blog will give an understanding of deploying a simple Spark based REST service project on Oracle Application Container Cloud using Oracle Developer Cloud. This post will show the essential capabilities for Spark framework based projects management, build automation and streamlined deployment in the Oracle Cloud, using Developer Cloud Service and deploying to Oracle Application Container Cloud.

 

Note: This blog is about Spark Java on Oracle Application Container Cloud using Developer Cloud Service and not about Apache Spark. Please refer the below link for Oracle Big Data Cloud Service.

https://cloud.oracle.com/en_US/big-data-compute-edition

 

 

Tech Stack Usage

Eclipse: IDE for Spark Java development.

Grunt: Tool for building the Spark Java zip archive for deployment.

Gradle: Build tool for Spark framework setup and jar deployment.

Spark: Java based framework for REST based Microservice development

JAVA: JDK 1.8

 

Oracle Developer Cloud: For application lifecycle management.

Oracle Application Container Cloud: For deployment of the Spark Java based web service on container hosted by the cloud service.

 

Setting up Spark Java Project and Oracle Cloud on Eclipse

Aim of microservice frameworks is to achieve more out of minimum footprint. Similarly Eclipse IDE due to it smaller footprint and flexibility is a very popular IDE with most of the Java developers around Java world. I would be using Eclipse for the REST based microservice development using Spark framework. Spark has a good Gradle build tool support and Eclipse has Gradle plugin which can be used for the assistance in development.

 

1. Gradle IDE: Using for the project support and the dependency setup.

2. Oracle Cloud Tools: For connecting to the Developer Cloud Service Instance

 

Note: These plugins can be downloaded from the Eclipse Marketplace. Below screen shots show the highlighted plugins which were

Installed for the Gradle based Spark development and for connecting to Oracle Cloud.

 

 

About Spark

Spark Framework is a simple and lightweight Java web framework built for rapid development. Sparks intention is to provide a pure Java alternative for developers that want to (or are required to), develop their web application in Java. Spark is built around Java 8's lambda philosophy, which makes a typical Spark application a lot less verbose than most application written in other Java web frameworks. It lets you take full advantage of the JVM. It will have you up and running in minutes, and you can even use it with Groovy or Kotlin or whatever you want. Spark is a simple, lightweight pure Java web framework. Please refer the link below for more information:

 

http://sparkjava.com/

 

Using Gradle for Spark Project Setup in Eclipse

Create a new project named ‘EmployeeService’ using the Gradle project as shown in the screen shot below. Select the Java Quickstart template in the sample project dropdown, in the project creation wizard.

 

Note: You will be able to see the Gradle project template option in the new project dialog, only if the above mentioned Gradle IDE plugin has been installed.

 

 

What we do not need from the generated code in the Project Template:

It generates sample Java files like Person.java, PersonTest.java and xml files like resource.xml and test-resource.xml. These files are not required and can be deleted. Below screen shot shows the files that need to be removed.

 

 

Existing file(s) that need to be created:

build.gradle: The build.gradle file that gets generated as part of the project template will be used for the project dependency configuration and executable jar generation. Below screen shot shows, what Gradle file should contain.

 

 

For the initial project setup the dependencies part is very important. We have two dependencies

 

 

1. Gson – for JSON transformation of the Java Objects.

2. Spark – The Spark framework, based on which we will be developing the microservice.

 

For the initial project setup the third line in the dependencies part is commented and the first two for Gson and Spark will be used so that Gradle is able to download these dependencies. As depicted by the snippet below:

dependencies {

    compile 'com.sparkjava:spark-core:2.3'

    compile 'com.google.code.gson:gson:2.3.1'

    //compile fileTree(dir: 'lib', include: '*.jar')

}

While uploading the code to Git, the first two lines need to be commented and the third one need to be uncommented, as we would be pointing to the Project lib directory for the dependencies.

To copy the dependencies to the lib folder in the project, we would be using the ‘copyRuntimeLibs’ task in the build.gradle file, as in the snippet below:

task copyRuntimeLibs(type: Copy) {

 

into "lib"

 

from configurations.testRuntime

 

}

 

We would then have to refresh the dependencies to get them in the project build path. This can be done by right clicking the project and then selecting Gradle(STS) and click Refresh Dependencies in the menu as shown below:

 

This would have downloaded all the project dependencies in the local Gradle repository which is synonymous to maven repository. And these dependencies get configured to the build path of the project by the Gradle eclipse plugin we are using for this blog.

Note: To build the Spark project on Developer Cloud Service, we would have to place the referenced libraries such as Gson and Spark in the project library folder (‘lib’).This can be done using the copyRutimeLibs task described above. Also, for building the executable jar for the project, the build.gradle should now point to the lib folder instead of the repository by commenting out the first two lines and instead use the fileTree compile as mentioned above.

 

File that Need to be created:

 

  • Gruntfile.js - defines the build task to create project archive for deployment.
  • manifest.json - defines the main file to be executed
  • package.json – defines the dependencies required for the Grunt tool to execute
  • Employee.java - it is the employee entity, contains fields and their respective getter and setter methods.
  • EmployeeData.java – Contains the method to set the list of static data for the sample.
  • EmployeeMain.java – This class contains the main method to be called for executing the service application.

 

Gruntfile.js

Gruntfile.js holds the task configuration to create a zip archive to be deployed on Oracle Application Container Cloud. It is also being used to configure the files that need to be packaged. For the Spark Java application to execute, package.json, Gruntfile.js files are not required and thus excluded from the src files list. It would need the jar file that gets compiled by executing the Gradle build and the jar would reside in the ‘build’ folder.

manifest.json

This file points to the executable jar that would be executed on Application Container Cloud. The major version defines the Java version which needs to be used for execution. Which for Spark based application is 1.8, mentioned as 8 in the manifest file.

 

package.json

This file is there to define the dependencies for the Grunt tool to execute, which we are using for packaging the zip archive for deployment.

 

 

Employee.java

This is an Employee entity class which defines the attribute and the getter/setter methods for the entity. These getter and setter methods are generated using the eclipse utility.

 

 

EmployeeData.java

This Java class file contains a method which returns an ArrayList of the Object of Employee class that we have described above.

 

 

EmployeeMain.java

This is the main class which calls the getAllEmployees method in the EmployeeData class. Here we use the son library to transform the Java object returned by the called method to JSON string. Here we also define the REST service resource URL and the REST method (GET). For this code to execute on Oracle Container Cloud service we have defined java util optional properties, host and port retrieving and setting the environment parameters which in case of the Application Container Cloud would be binding port and ip address.

 

 

Code Check-in

Make a Oracle cloud connection by opening the Oracle Cloud Connection view tab from

Eclipse Menu -> Show View -> Oracle Cloud -> Oracle Cloud

Give the instance details and ensure that you have already created a project repository. Configure the GIT repository with the project. Please refer to the below blog link for details on putting your eclipse project on Oracle Developer Cloud:

 

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2015/08/10/taking-an-eclipse-project-to-the-cloud

 

Configuring the Build Process

Start with giving name to the Build job. I have named it SparkBuild, but you can name it anything as per your choice. Below screen shot shows the same. Also make sure to configure the JDK dropdown to JDK 8 as Spark uses the same.

 

 

Then, in the Source Control tab, we have to select Git as an option and configure the Git repository to be used for build by selecting the same from the dropdown as shown below.

 

 

Then you will have to configure the Build Steps. Please select the Gradle Build first, and configure the Tasks to be executed as ‘jar’ and configure root build script folder, which in this case is EmployeeService(The project folder where the build.gradle resides). This will build the jar on the temporary space on the Hudson server.

Then select Execute Shell as the Build Step from the ‘Add Build Step’ drop down. Then add the below given commands to be executed to create the zip archive, which would be deployed on Application Container Cloud.

We would have to change directory to the Project folder name checked in the Git repository. The npm commands will install the grunt related modules, so that we can run the grunt command to package a zip file for deployment.

Grunt command will execute the Gruntfile.js using the Grunt dependencies in the package.json to build the project deployment archive employeeservice.zip as mentioned in the Gruntfile.js.

 

 

And, finally for the build job to execute and save the generated artifact, which in this case is a zip file we would have to configure the same in the Post Build tab.

Note: For auto deployments, post completion of the build, we can configure the Cloud Service Deployment by selecting/checking the relevant check box. For this the deployment configuration should be first completed.

Deployment

Below screen shot describes the deployment configuration which needs to be done in the Deploy menu. Here you will have to select Oracle Application Container Cloud as the Deployment target and also provides credentials for the it and select Runtime as Java. Then select the SparkBuild as the build job, the last successful build that you will like to deploy and the artifact generated as shown below.

 

 

Post successful deployment you will be able to see the below card on the deployment dashboard.

 

For testing if the service is running fine or not, below in the URL that needs to be used in the browser:

 

https://employeeservice-paas124.apaas.em2.oraclecloud.com/employees

 

Where the highlighted part of the URL may change based on your cloud instance and the deployment name.

 

On accessing the URL from the browser, below is the expected response:

And here you go, you have your Spark REST service deployed on the Oracle Application Container easily by using Developer Cloud, saving tons of scripts for deployment and build automation.

So, go on and code your first MicroService on Spark and deploy it on Oracle cloud. Happy Coding!

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

This blog teaches you how to deploy a simple PHP based REST microservice project on Oracle Application Container Cloud using Oracle Developer Cloud.

This post shows the essential capabilities for PHP projects management, build automation and streamlined deployment in the Oracle Cloud, using Developer Cloud Service and deploying to Application Container Cloud.

 

Tech Stack Usage

Eclipse: IDE for PHP development.

Grunt: Tool for building the PHP code archive for deployment.

Oracle Developer Cloud: For application lifecycle management.

Oracle Application Container Cloud: For deployment of the PHP based web service on container hosted by the cloud.

 

Setting up PHP and Oracle Cloud on Eclipse

Eclipse is a very popular IDE to which most of the developers from Java world are acquainted with. Eclipse caters to lot of other development environments other than Java. The same IDE can be used for our day to day PHP code development. To test the application locally you can install a cross platform web server such as XAMPP specific to the 32/64bit OS(Windows/Linux/Mac) being used. You will also need the following plugins in Eclipse:

 

  1. 1. PHP Development Tools (PDT): For developing PHP code in Eclipse.
  2. 2. Oracle Cloud Tools: For connecting to the Developer Cloud Service Instance

 

Note: These plugins can be downloaded from the Eclipse Marketplace. Below screen shots show the highlighted plugins which were installed for the PHP development and for connecting to Oracle Cloud.

 

Apart from these tools, you can also install cross platform web server platform such as XAMPP. It will enable us to test the PHP code that we develop on Eclipse locally, before pushing it to the Git repository of Oracle Developer Cloud Service. Below is link from where XAMPP can be downloaded. Choose the version based on the operating system and the system architecture (32/64 bit) to install upon.

https://www.apachefriends.org/download.html

Post installation, you can bring up the XAMPP control panel as shown below, to start the Apache server.

 

On installation of the Oracle Cloud plugin, you will be able to see the same from Eclipse Menu -> Show View -> Others -> Oracle Cloud. As depicted in the screenshot below.

 

Once the PHP Plugin is installed, you will be able to see the same in the Eclipse Menu -> File -> New -> Others -> PHP -> PHP Project, where you will be able to select and create a PHP project with an appropriate view.

 

PHP Project

On creation of the PHP project an empty PHP project gets created with no files in it. We will have to develop all the code files and below screen shot shows the PHP project EmployeeService with the files created.

PHP Language Library and PHP include path will be generated as part of the project template. Rest all the files need to created.

File that Need to be created:

 

  • Gruntfile.js - defines the build task to create project archive for deployment.
  • manifest.json - defines the main file to be executed
  • package.json – defines the dependencies required for the Grunt tool to execute
  • start.sh - script file to start apache server
  • timer.sh - script file to simulate an application log
  • employee.php - it is the employee entity and holds the static data to be used for the response
  • service.php – the actual service code is written here
  • employee-api.php – it is the REST service controller

 

employee.php

For the purpose of the blog, I have just included two records for the employee class in the array.

The getAllEmployees() function which will be called by the service.php returns an array of Employee objects.

 

service.php

The getAll function is the service function to get all the employees by calling the getAllEmployees() function in employee.php. It returns the employee array of employee objects.

 

employee-api.php

The code in this PHP file acts as a service controller. It receives and validates the incoming request, maps the function to be called, calls the function and then sends the response back.

 

Gruntfile.js

Gruntfile.js holds the task configuration to create a zip archive to be deployed on Oracle Application Container Cloud. It is also being used to configure the files that need to be packaged. For the PHP application to execute, package.json, PHP library and Gruntfile.js files are not required and thus excluded from the src files list.

 

manifest.json

In this file we configure the file to be executed. In this case it would be shell script to start the apache web server.

package.json

It just contains dependencies to execute the grunt command for generating zip for deployment.

 

start.sh

This file contains the shell script to start/run apache web server in the container. It calls the timer.sh for time logs.

timer.sh

It helps simulate application log.

 

Code Check-in

Make a Oracle cloud connection by opening the Oracle Cloud Connection view tab from

Eclipse Menu -> Show View -> Oracle Cloud -> Oracle Cloud

Give the instance details and ensure that you have already created a project repository. Configure the GIT repository with the project. Please refer to the below blog link for details on putting your eclipse project on Oracle Developer Cloud:

 

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2015/08/10/taking-an-eclipse-project-to-the-cloud

 

Configuring the Build Process

Start with giving name to the Build job. I have named it PHPBuild, but you can name it anything as per your choice. Below screen shot shows the same.

Then, in the Source Control tab, we have to select Git as an option and configure the Git repository to be used for build by selecting the same from the dropdown as shown below.

 

Then you will have to configure the Build Steps. Please select the Execute Shell as the Build Step from the ‘Add Build Step’ drop down. Then add the below given commands to be executed:

We would have to change directory to the Project folder name checked in the Git repository. The npm commands will install the grunt related modules, so that we can run the grunt command to package a zip file for deployment.

Grunt command will execute the Gruntfile.js using the Grunt dependencies in the package.json to build the project deployment archive employeeservice.zip as mentioned in the Gruntfile.js.

 

And, finally for the build job to execute and save the generated artifact, which in this case is a zip file we would have to configure the same in the Post Build tab.

Note: For auto deployments, post completion of the build, we can configure the Cloud Service Deployment by selecting/checking the relevant check box. For this the deployment configuration should be first completed.

 

Deployment

Below screen shot describes the deployment configuration which needs to be done in the Deploy menu. Here you wouill have to select Oracle Application Container Cloud as the Deployment target with Runtime as PHP. Then select the PHPBuild as the build job, the last successful build that you will like to deploy and the artifact generated as shown below.

 

 

 

 

Post successful deployment you will be able to see the below card on the deployment dashboard.

For testing if the service is running fine or not, below in the URL that needs to be used in the browser:

https://phprestemployeeservice-paas124.apaas.em2.oraclecloud.com/employee-api.php/employees

Where the highlighted part of the URL may change based on your cloud instance and the deployment name.

 

On accessing the URL from browser below is the expected response:

And here you go, you have your PHP REST service deployed on the Oracle Application Container easily by using Developer Cloud, saving tons of scripts for deployment and build automation.

Have fun coding/deploying PHP applications on Application Container Cloud using Developer Cloud Service.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

Developer Cloud Service adds support for new languages and technologies with its February update.

 

Integrated SQLcl for Database development

SQLcl is a command line tool for Oracle Database which allows you to execute SQL, PL/SQL, and SQL*Plus scripts. Use the new SQLcl build plugin to run Database scripts as part of your Continuous Integration pipelines. Use SQLcl to add seed data and validate database changes as part of your test automation scenarios. The SQLcl build plugin also includes secure credential storage for Oracle Database credentials.

 

PHP deployment to Application Container Cloud Service

Deploy tools are updated to push PHP applications to Application Container Cloud Service. PHP code that is managed in Git can now be packaged and delivered to new PHP-based containers. Configure PHP applications to deploy an individual build, continuously, or as part of a build step in your pipeline.

 

Git branch visualization graphs

The Code tab introduces a new Graph view to provide a visual representation of a Git repository. Each git event such as commits, branches, merges, etc. are represented in the Graph view. Each event is linked to additional details making it easy to navigate to the diff view of a Commit transaction, linked Issues, Merge Requests on a branch, and more.

 

gitgraph.jpg

 

 

Time tracking for Agile and Issues

Issues include options to estimate the amount of time required to complete an individual Task, Feature, or Bug. A new Time Spent property has been added to the estimates to log the amount of time being spent on the Issue. Tracking time spent on an Issues help teams more accurately monitor the progress of individual items in a Sprint. This information is also reflected in Active Sprints and Sprint Reports.

 

timespent.jpg

 

Simplified Oracle Maven Repository Configuration

You no longer need to manually configure the Maven settings.xml and settings-security.xml for the Oracle Maven Repository. Connect Oracle Maven Repository is a new Environment option in the Job Configuration wizard which takes care of all necessary Oracle Maven Repository configuration during the build execution. Simply check a box to download Oracle library dependencies during your builds.

 

Additional information on new features can be found in the What's New document. Tutorials, examples, and feature documentation can be found in the Developer Cloud Service Documentation.

This blog will help you understand usage of Oracle Developer Cloud service for automated testing of NodeJS REST based web service application using a popular testing framework called Jasmine. The NodeJS application will be deployed on Oracle Application Container Cloud Service.

 

Note: For details on how to develop and deploy NodeJS REST application on Application Container Cloud using Developer Cloud service, please refer the blog link mentioned below.

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

 

Tech Stack Usage

Eclipse: IDE for Nodejs development.

Expressjs: Nodejs module for REST web service development.

Grunt: Tool for building the Nodejs code archive for deployment.

Testing Framework: Jasmine

Oracle Developer Cloud: For managing the application lifecycle of the Project.

Oracle Application Container Cloud: For deployment of the Nodejs web service on container hosted by the cloud.

 

Setting up Jasmine for NodeJS application Testing:

After developing the NodeJS REST service application following the blog link given above, you will have a REST application in NodeJS deployed on Application Container Cloud Service. For this blog purpose I have named it as ServiceTest, but you are free to name it what you want.

 

The code files for testing using Jasmine framework can be included as part of separate ‘test’ folder(more from the segregation perspective). Since this is a sample service we are developing to see how the Jasmine based test automation works using DEVCS,we chose to keep the test scripts in the same application project. But for full scale projects, with comprehensive test scripts, you may choose to have a separate Git repository and project for the test scripts.

Below is the screen shot of the ServiceTest project in Eclipse:

 

2017-02-02 16_53_53-Node - Eclipse.png

Files for the NodeJS REST service:

 

  • Gruntfile.js – defines the build task
  • manifest.json - defines the main file to be executed, which is service.js
  • service.js – the actual service code is written here, it is the main service code which gets executed.
  • package.json – File to define the dependencies

 

Folder and files for test scripts:

Below screenshot describes the ‘test’ folder structure

2017-02-02 17_28_05-Node - ServiceTest_test_spec_helloTestSpec.js - Eclipse.png

For the purpose of clarity and maintainability all the file in the test folder are arranged in separate folders. Below is the description of what each file is for:

 

  1. jasmine.json -  it is the configuration file for Jasmine test framework.
  2. reporter.js – It contains script for testcase execution reporting and is a helper file so it resides in the  ‘helper’ folder.
  3. helloTestSpec – This file has the test case scripts or specs, as called in Jasmine.

 

Below is the link for detailed understanding of the Jasmine framework:

https://jasmine.github.io/2.0/node.html

 

There are specific configurations that need to be included for the test scripts to execute. Below are the file(s) and configurations highlighted:

package.json

The Jasmine config path is important as it is this configuration which tells the location of jasmine.json to the jasmine command which gets executed on execution of ‘npm test’ command. You will see this as part of the build configuration, later in the blog.

2017-02-02 17_34_57-Node - ServiceTest_package.json - Eclipse.png

 

A peek in to the test scripts code snippets:

jasmine.json

This file will contain the configuration for location of the spec file directory and also the helper files directory. Apart from these it would also contain the other Jasmine framework level configurations as well, as to be seen in the screenshot below.

2017-02-02 17_39_18-Node - ServiceTest_test_jasmine.json - Eclipse.png

helloTestSpec.js

This file contains the test case scripts or the ‘specs’ as known in the Jasmine framework terminology. It also would have to contain the application url to test. In case of deployment of the NodeJS application on Application Container Cloud, there is a specific anatomy of the application that is followed.

Here the application_name contains the name given in the deployment configuration of the Developer Cloud Service. While instance_url is the, url common to all the applications  deployed on Application Container cloud for the particular instance.

2017-02-02 17_38_57-Node - ServiceTest_test_spec_helloTestSpec.js - Eclipse.png

If you have already deployed the NodeJS REST application, then below screen shot shows, where you can look for the Url on the Application Container Cloud console.

2017-02-02 14_59_47-Oracle Application Container Cloud Details.png

reporter.js

I have just included a reporter helper for test case execution console reporting. We have configured certain properties as well to customize the report on console. You are free to include some other package for reports or write your own custom spec reporter as well.

2017-02-02 17_39_34-Node - ServiceTest_test_helpers_reporter.js - Eclipse.png

 

Build Configuration:

We will configure a separate build job in Developer Cloud Service for the test case execution. Below are the build job configuration screen shots.

2017-02-02 18_54_55-Build_ NodeTest - Oracle Developer Cloud Service.png

 

 

 

The Git repository remains the same as that of the NodeJS application as the ‘test’ folder is part of the NodeJS REST application project.

2017-02-02 18_55_14-Build_ NodeTest - Oracle Developer Cloud Service.png

 

 

We would have to change the directory to ServiceTest. Then install Jasmine using --save-dev jasmine, so that jasmine command is recognized as it get executed by npm test which in turn calls the test configuration in the package.json as described above in the blog and highlighted in the package.json screenshot.

2017-02-02 18_55_33-Build_ NodeTest - Oracle Developer Cloud Service.png

 

On Execution of the TestAppl build job:

On execution the test case/specs get executed and the console based report which can be seen from the build job console will show the test execution report. You can access the console output by clicking the console button in the build details.

2017-02-02 19_11_22-Build_ NodeTest - Oracle Developer Cloud Service.png

 

Below screen shot shows the console output on execution of the npm test, which in turn executes the jasmine specs. The report shows the tests executed, the response and the time taken to execute the spec. These configurations for display on console are part of the reporter.js helper script, described above in the blog.

2017-02-02 19_12_03-Build_ NodeTest - Oracle Developer Cloud Service.png

 

Enjoy automating your testing using Jasmine and seamlessly executing it using Oracle Developer Cloud Service.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

The rich functionality you can get from integrating Oracle SOA Cloud Service with Oracle Developer Cloud Service attracts a lot of attention lately.

Here is the latest blog about the topic from Oracle's A-Team member Roland Koenn

Automated Deployment to SOA Cloud Services using Developer Cloud Services

 

flow.png

 

For more on the topic check out additional SOA related blogs here:

CI, DevOps and ALM for Oracle SOA Suite with Oracle Developer Cloud Service
Deployment on Oracle SOA Cloud Service using Developer Cloud service

This blog will help you understand deployment of Dropwizard application on Oracle Application Container Cloud Service using Developer Cloud Service.

 

Before we begin, a brief on what Dropwizard is:

Dropwizard stands on a line between being a library and a framework. It is Java based, uses the Jetty HTTP library to embed a HTTP server directly into the project. It uses Jersey for helping developers build Restful web applications and uses Jackson to handle JSON based data. You can find rest of the information in detail about Dropwizard on its website - http://www.dropwizard.io/

 

You can follow the tutorial given in the link below, to develop your Dropwizard application from scratch and the rest of the blog will tell you how to deploy it using Oracle Developer Cloud Service on an Application Container.

http://www.dropwizard.io/1.0.5/docs/getting-started.html

Once you follow the Dropwizard tutorial (link given above) you will have an application on your machine as per the folder structure given below. I have named the application as bookings so the containing folder is named ‘bookings’ as well.

2016-11-29 20_16_43-bookings.png

 

The application that gets created, compiled after following the Dropwizard tutorial will not contain the below files/folder(s). These, we will have to add externally.

  • Gruntfile.js
  • manifest.json
  • package.json
  • node_modules

All the above mentioned files and folders would be used to package the application archive and make it deployable on Java container of Oracle Application Container Cloud Service.

 

The manifest.json file should be as per the screenshot. Ensure that the YAML file name with .yml extension is correct and you are pointing to the right jar. Also the major version field  is for JVM which should be given as 8.

2016-11-29 21_29_28-D__WorkSpaces_DropWizard_Bookings_bookings_manifest.json - Notepad++.png

 

Gruntfile.js should contain the name of the file to be included in the package by mentioning those in the src array.

Note: It should not contain node_module, Gruntfile.js and package.json. As these files are required only for packaging and do not play any role in the application execution.

2016-11-29 21_28_09-D__WorkSpaces_DropWizard_Bookings_bookings_Gruntfile.js - Notepad++.png

 

Please ensure that the package.json is as shown below in the screen shot. And the mentioned dependencies are installed in the node_modules folder using the npm install <dependency name>

2016-11-29 21_29_58-D__WorkSpaces_DropWizard_Bookings_bookings_package.json - Notepad++.png

 

Note: All the three files are attached to this blog for reference. Please refer the blog link below for the npm install execution.

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

Developer Cloud Service:

Now for us to package and deploy using Developer Cloud Service, we will have to create a project and Git repository named Bookings on Oracle Developer Cloud Service. Then use the Eclipse to upload the Dropwizard project code to the created Git repository. Please use the link below of my previous blog which will help you in creating the Project, Git repository on Developer Cloud Service and setup eclipse and Oracle cloud plugin to upload the code on the Git repository.

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

Build:

Once the code is checked in the Git repository, we will only have to do the build and deployment configurations on the Developer Cloud Service as per the below screen shots:

The build execution will generate a bookings.zip file. You can also reference my previous blog(linked mentioned above in the Developer Cloud Service section) where you can find the post build configurations as well, if you choose to automate the post build process.

2016-11-29 22_09_22-Build_ TemplateProject - Oracle Developer Cloud Service.png

2016-11-29 22_09_43-Build_ TemplateProject - Oracle Developer Cloud Service.png

2016-11-29 22_10_20-Build_ TemplateProject - Oracle Developer Cloud Service.png

Deployment:

In the deployment configuration we would have to select ACCS and Java as the option. We would then have to select the build job that we configured and also the successful build and the deployment archive generated out of the build. Rest everything else remains the same as described in the Nodejs blog for which link has been provided below.

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

This blog is the second in series of NodeJS REST service blogs. My previous blog (link below) covered the setting up of development environment for Nodejs development for simple static JSON based REST service development. It also covered the usage of Oracle Developer Cloud to Develop, Build and Deploy the Node code on Oracle Application Container Cloud Service.

This blog goes a step further to introduce the usage of Oracle Database Cloud Service (DBCS ) with Nodejs for REST service development. Also shows how Developer Cloud Service could be used for build, deployments for Database Cloud Service.

This blog also shows how the entire application lifecycle can be managed for a Microservice using Developer Cloud for the mentioned technology stack.

 

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

Tech Stack Usage

Eclipse: IDE for Nodejs development

Jdeveloper 12.1.3: For Database Development

Expressjs: Nodejs module for REST web service development.

Grunt: Tool for building the Nodejs code archive for deployment.

Oracle Developer Cloud: For managing the application lifecycle of the Project.

Oracle Application Container Cloud: For deployment of the Nodejs web service on container hosted by the cloud.

Oracle Database Cloud Service: As the database for building the REST service.

 

Note: For the purpose of this blog the development environment was setup on Microsoft Windows 7.

 

Database Development

Let us now start with the Database Development first. For this blog we will be developing very simple DDL script which will just focus on getting database table ready for the service consumption.

Steps:

  • Setup the Oracle Database Cloud service for usage and note the SYS user credentials for future usage.
  • As part of the development environment setup, first install a Jdeveloper 12.1.3 on your machine.
  • Create a Database Application in Jdeveloper using the below shown template.
  • Create a sql script file called employee.sql and also generate an Ant build file using the option Empty Build File (Ant) option from the New Gallery.

 

Please refer the screenshots below to see the project structure for the database application. Also attached are the files for the sql script and ant build.xml.

 

2016-11-21 16_41_04-Oracle JDeveloper 12c - EmployeeData.jws _ DatabaseModel.jpr _ D__WorkSpaces_JDE.png2016-11-21 16_50_38-Oracle JDeveloper 12c - EmployeeData.jws _ DatabaseModel.jpr.png

.      

 

We would also need the ojdbc7.jar for the Ant task to run. You can download this jar using the link http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html. Create a “lib” folder in the DatabaseModel project of your workspace and place the downloaded jar there. Also include this jar in the project classpath using the libraries and classpath option for project in Jdeveloper.

Node that the build.xml file should have the DBCS user id as “SYS as SYDBA” if SYS admin user is getting used Below are the screenshots for the sql file and build.xml. Also point to the lib folder where you have placed your ojdbc7.jar. Keep it contextual to make it work on cloud as well.

 

2016-11-21 17_40_56-Oracle JDeveloper 12c - EmployeeData.jws _ DatabaseModel.jpr.png  2016-11-22 11_14_26-C__Users_abhshrof_Desktop_attachments_build.xml - Notepad++.png

   

Now create the Project on Oracle Developer Cloud Service called NodeOracleDB (you can keep a name of your choice). After creation of the project, Create/Initialize two empty repositories as shown in the screenshot below.

DatabaseScripts -   This Git repository will contain the database project code we just created using Jdeveloper.

EmployeeService -  This will contain the Node code we are about to develop for the REST service.

 

2016-11-21 16_55_02-Home _ NODEOracleDB - Oracle Developer Cloud Service.png

For understading the usage Jdeveloper’s Team plugin with Oracle Developer Cloud for Git repository operations please refer to the blog link below.

https://blogs.oracle.com/shay/entry/using_the_oracle_developer_cloud

 

Once the code is uploaded to the DatabaseScripts Git repository, you would have to configure the build as shown in the screen shots below.

Note: in the source control point to the databaseScripts.git repository.

 

2016-11-21 19_33_35-Build_ NODEOracleDB - Oracle Developer Cloud Service.png

 

On executing the build the Ant task will use the ojdbc7.jar to execute the sql statement in the sql file and create the table/insert test data on the DBCS.

Note: Grant permissions to the table and tablespace as per your need. Please visit the Oracle database documentation for help if needed.

 

Nodejs REST service Development

 

In my previous blog on Nodejs REST development, I had covered Eclipse setup for Nodejs, setup of Oracle cloud plugin and usage of the same for Oracle Developer Cloud service. Please refer the link below for the sections: Setting up Nodejs and Oracle Cloud on Eclipse, REST using Expressjs, Files that need to be created and Code Check-in

 

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

Note:  While following the instructions in “Files that need to be created” section, please do not copy the code for service,js and Gruntfile.js as these files need to go through some changes.

 

Apart from the setup done following the blog link given above, we would have to do some more additions and changes to the Nodejs REST service project.

 

After the Nodejs EmployeeService project is created and the changes are done as per the previous blog. Open the command prompt and change to the EmployeeService directory. And then start preparation for adding the oracledb node module.

 

Preparing for the Database consumption in Nodejs

 

To consume Oracle Database in Nodejs, you would need to have a compiled node driver. It will be a node module which will be referenced by your code to perform database operation from the Nodejs code.

I would recommend you to read and follow the document link below, to enable you to download the oracledb node module code from GitHub and then compile it. This document lists down steps for various operating systems where you can compile the code.

https://github.com/oracle/node-oracledb/blob/master/INSTALL.md

 

Advice: Try compiling the node-module with npm directly in your Nodejs REST service project to avoid any issues.

 

Note: You can also follow this blog https://blogs.oracle.com/opal/entry/introducing_node_oracledb_a_node,

to know more about the Oracle Database driver for Nodejs.

 

Below is the list of files that need to be there in the EmployeeService project:

  • dbconfig.js
  • Gruntfile.js
  • service.js
  • package.json
  • manifest.json

 

The README.md is optional, but good to have for documentation sake.

 

In the node_modules folder below are the modules required:

  • express
  • grunt
  • grunt-contrib-compress
  • grunt-hook
  • load-grunt-tasks
  • oracledb

 

  2016-11-22 00_35_42-Node - EmployeeService_dbconfig.js - Eclipse.png

 

 

Files that need to be added new or changed:

Note: Code to all the files with placeholder will be attached to the blog.

 

  • dbconfig.js
  • Gruntfile.js
  • service.js
  • package.json

 

Gruntfile.js

The structure of the Gruntfile remains the same as the one in my previous blog, only thing that changes is the src array. Where instead of giving wildcard to include all the files in the package, we would specifically give the names of the files and folders that we would like to include in the archive. This is being done to ensure that oracledb node module folder does not get included in the archive. Below is the snippet of the changed piece of code.

 

src: ['./dbconfig.js','./Gruntfile.js', './service.js','./manifest.json','./package.json','./node_modules/express/**/*','./node_modules/grunt/**/*','./node_modules/grunt-hook/**/*','./node_modules/grunt-contrib-compress/**/*','./node_modules/load-grunt-tasks/**/*']

 

Please refer the attached file for complete code.

 

dbconfig.js

This file contains the database related configurations and has been created for the maintainability and modularity sake. Although this file is being used mostly for the local testing of the Nodejs code, as on deployment on Application Container Cloud, it will have to access the database using database service binding. I will be covering this in a while.

Please refer the attached file for complete code.

 

package.json

This file would have only an addition of oracledb node module in the dependencies. Below is the configuration which gets added in addition to package.json of EmployeeService project from previous blog(link as given in the starting).

 

"oracledb": "1.11"

Please refer the attached file for complete code.

 

service.js

This is the main service code file. This goes through a radical change, as it no longer uses the static json but now retrieves the data from the database. The code now, executes a query using the oracledb node module(Oracle Database Driver) and then processes it to construct a json object which is then send as a response to the service calls. I have used a select query with metadata based dynamic result set processing.

The database access code for local, which access the dbconfig while on Application Container Cloud it uses the service binding is:

 

2016-11-22 10_27_53-Node - EmployeeService_service.js - Eclipse.png

Similarly for the listening port we could use the below snippet for the ease of local testing:

           process.env.PORT || 8089

 

Please refer the attached file for complete code.

 

Build Configuration

It very much remains the same as the previous blog. Please refer the section “Configuring the Build Process” for details.

https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2016/09/07/oracle-developer-cloud-to-build-and-deploy-nodejs-rest-project-on-application-container-cloud

 

Deployment Configuration

It very much remains the same as the previous blog. Please refer the section “Deployment of the Archive on Oracle Application Container Cloud Service” for details, using the link given above.

Post completion of all the configurations, execute the build. If you have configured post build deployment (as shown in the previous blog), then the build process itself would deploy and start the application on the Application Container cloud.

 

Database Service Binding

This is a configuration for database access for the Nodejs code deployed on Application Container Cloud. Ensure that you provide the schema user and password for use. This configuration needs to be done from the Application Container Cloud service console. This configuration can be done post the application deployment is completed by navigating to the application detail. Please refer the screenshot below:

 

2016-11-22 10_40_24-.png

 

You will be able to access the service consuming database once the application starts.

2016-11-22 10_59_44-https___employeeservice-paas124.apaas.em2.oraclecloud.com_getUsers.png

  

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

This blog will provide an understanding of how Oracle developer Cloud Service can be leveraged to do deployment of SOA composites developed using Jdeveloper on Oracle SOA Cloud Service.

Note: The scope of the blog does not cover how to develop a SOA composite.

 

Tech Stack Usage and its respective version:

Oracle Developer Cloud Service

Oracle SOA Cloud Service with SOA version 12.1.3

Jdeveloper 12.1.3

Maven 3.3.9

All local installations are done on Microsoft Windows

 

Setting up the SOA Development environment in brief:

To install using Jdeveloper 12.1.3 with SOA plugin locally on your machine you will have to use

“Oracle SOA Suite 12.1.3 Quick Start Download”. Below is the link that can be used to download the SOA quick start installer version 12.1.3.

http://www.oracle.com/technetwork/middleware/soasuite/downloads/soa1213qsdownload-2769533.html

2016-11-17 12_52_29-SOA Suite 12.1.3 QuickStart download.png

This will install Jdeveloper 12.1.3, SOA 12.1.3 plugin and integrated Weblogic server with SOA libraries which will enable you to develop, deploy and test the SOA application locally using the integrated Weblogic server. You can follow the below documentation for the quick start setup.

https://docs.oracle.com/middleware/1213/core/SOAQS/integrated.htm#SOAQS206

Note: Having Jdeveloper 12.1.3 and then trying to install SOA plugin from the updates does not work anymore.

 

Installing Maven locally on your machine:

You will have to download the Binary Zip archive from the Maven website using the URL as given below:

http://maven.apache.org/download.cgi

 

2016-11-17 13_01_45-Maven – Download Apache Maven.png

You would have to unzip the maven binary zip download from the above site. When using Windows(as I have used for this blog), ensure that the jdk1.7 or greater and maven(downloaded and unzipped) bin directory file paths are set in the PATH environment variable. Also the JAVA_HOME variable should be set as well. Please use the below link to get more details on maven setup.

http://maven.apache.org/install.html

 

Oracle Cloud Service Setup

Developer Cloud Service:

You need to create a project and create an empty repository where the SOA application code needs to be checked in as shown in the screenshot below. Also, please take a note of the maven repository and Git repository URLS on the right hand side on the screen that you would need in the subsequent steps.

 

2016-11-17 14_02_28-Home _ SOAService - Oracle Developer Cloud Service.png

 

 

 

SOA Cloud Service

 

You would also have to create a SOA cluster instance in the SOA cloud service. Post creation of the instance, you will be able to see the instance listed on the page. As, it can be seen in the screen shot below. Make sure that, you take a note of the username and password that you provide for the Weblogic server instance while creating the SOA cluster instance.

 

2016-11-17 14_26_15-Oracle SOA Cloud Service Details.png

Click on the instance name to see the details. Note the public IP address shown for your instance. For the one I am using it is: 140.86.38.104.

 

2016-11-17 14_26_51-Oracle SOA Cloud Service Details.png

 

 

Jdeveloper Setup:

 

Post SOA quick start installation, Jdeveloper 12.1.3 will be installed on your machine. Select the SOA application from the new application template as depicted in the consecutive two screenshots below.

 

2016-11-17 14_34_41-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png2016-11-17 13_53_02-New Gallery.png

 

You can use the below given blog link as a reference for using the Git repository on the Developer cloud service that we had setup, to check in your SOA application code in Jdeveloper.

https://blogs.oracle.com/shay/entry/using_the_oracle_developer_cloud

 

SOA Application Changes for Maven Build:

 

There are two POM files (considering you are creating one SOA composite for now) in the SOAService application. One is at the Application folder level. And another is at the composite project level. The POM file which is at the application folder level is the parent POM file which lists the composite modules that are part of the application and need to be build. Below is the screen shot that shows the SOA application project structure.

 

2016-11-17 14_53_44-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png

 

Highlighted entries need to be added to the Application level POM file to ensure that it first access the Oracle Developer Cloud Project maven repository for the build. The URL to this repository can be retrieved from the Developer Cloud service home page.

 

2016-11-17 14_49_29-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png

 

In the composite project (in the project structure the project name is Service) level POM the sar location needs to be appended with -SNAPSHOT.jar and we need to ensure that the version of the project is

  1. 1.0-SNAPSHOT. We will also have to add the repository entries as we had done for the previous application level POM.

 

2016-11-17 14_59_53-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png  2016-11-17 15_01_46-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png

2016-11-17 15_01_59-Oracle JDeveloper 12c - SOAService.jws _ Service.jpr _ D__WorkSpaces_JDEV_SOASer.png

 

 

 

Syncing the remote Maven repository for the SOA Build:

In the local maven repository which gets created under C://Users/<logged username>/.m2 there would be a settings.xml file where you would have to define the remote cloud repository for syncing. Giving the Developer Cloud service credentials (password can be encrypted) and the remote maven repository URL. Please refer the screenshot below.

 

2016-11-17 15_11_54-C__Users_abhshrof_.m2_settings.xml - Notepad++.png

 

Once the maven settings.xml changes are  done you would have to run the below maven commands from the command prompt to sync the Developer Cloud service Project maven repository.

Note: Doracle-maven-sync.oracleHome would hold the folder path to the SOA quick start middleware installation. This may change based on your middleware location you would have given while installing.

 

mvn deploy:deploy-file -DpomFile=<middleware home>/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/oracle-maven-sync-12.1.3.pom -Dfile=<middleware home> /oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/oracle-maven-sync-12.1.3.jar -DrepositoryId=MavenRepositorySOAService -Durl=<Oracle Developer Cloud Service Project Maven Repository>

 

mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=<middleware home> -Doracle-maven-sync.serverId=<settings.xml repository id> -P <settings.xml repository profile id>

 

Sample entries for reference:

<middleware home> : D:/Installs/fmw12130/

<settings.xml repository id> :  MavenRepositorySOAService

<Oracle Developer Cloud Service Project Maven Repository> :  https://developer.em2.oraclecloud.com/profile/developer61728-paas124/s/developer61728-paas124_soaservice_2216/maven/

<settings.xml repository profile id>: ProfileForSOAServiceProject

 

The repository sync will take some time based on your network speed. In case it times out you can rerun the above push command and it will start from where it had stopped syncing. You can see the entries of it getting created in the project activity feed in Developer Cloud Service project home page.

 

Finally, below are the build configurations that need to be done for the Maven build to take place:

Both the build and deploy of the composite in developer Cloud Service will be done by the maven build, there is no separate deployment configuration that needs to be done in the Developer Cloud service.

You will have to set three build parameters;

  1. serverUrl – http://<public ip of the SOA instance>:80
  2. user – username set for the Weblogic server while creating the SOA instance
  3. password – password set for the Weblogic server while creating the SOA instance.
  4. middlewareHome - opt/Oracle/Middleware/SOA

 

Below are the screenshots showing the build configuration and message output post maven goal execution

2016-11-17 15_29_15-Build_ SOAService - Oracle Developer Cloud Service.png

2016-11-17 15_29_56-Build_ SOAService - Oracle Developer Cloud Service.png

2016-11-17 15_30_49-Build_ SOAService - Oracle Developer Cloud Service.png

 

 

 

 

Message Output on the console would look like:

 

2016-11-17 15_31_16-Build_ SOAService - Oracle Developer Cloud Service.png

 

I have attached two pom files: application level POM and project level POM from which the above code snippets screenshots were taken.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

This blog will give an understanding of the Developer Service project and repository structure on Git in Oracle Developer cloud service. We will go through a simulated scenario of a project and see how to structure it and map it to the projects in IDE’s like Jdeveloper, Netbeans and Eclipse.

 

Below is the screenshot of the published licensing of Oracle Developer Cloud Service:

Pricing.png

As per the Developer Cloud Service licensing, we are entitled for 3 Developer Service Projects for a trial instance and 12 Developer Service Projects with subscription of the PaaS services like Oracle Java Cloud Service, Application Container Cloud Service etc.

There are always questions around how does this map to the projects in the IDE such as Jdeveloper. Does the Developer Service project map to the application or the project (within application) in the Jdeveloper.

Before we move on to the mapping, let us understand the Developer Service Project and Git repository relation.

 

Developer Service Project – One Developer Service Project can contain multiple Git repositories. Thus it is a logical/functional relation between the Git repositories consolidated under an umbrella of the project.  And we can create as many Git repositories required (constrained only by the storage available for Git as per the subscription entitlement).

 

Scenario

Now we have to look at how does this map to the Application/Projects in an IDE. For this, let us take a hypothetical scenario of developing Employee Rewards system. Below are the identified components required for the system development:

  1. Oracle JET Application – Containing the employee rewards portal user interface application named EmployeeRewardsUI. This will be developed using Netbeans, which will have a project named EmployeeRewardsUI.
  2. SOA Application – Containing 2 composites for retrieving employee rewards data from the database and employee details from PeopleSoft on premise application. The composites are namely – RewardsService, EmployeeInfoService. This application will be developed using Jdeveloper.
  3. Node REST Service Application– It’s a REST service application for Employee rewards information for external consuming. This will be developed using Eclipse, with workspace name EmployeeNodeJSWS and Node project named EmpRewardsNodeREST.

 

All the above applications and their code, though in different technologies still will be considered related and part of the Employee Rewards project. But each application will have a separate set of code, developed using a different technology and requires a different build procedure. Below is the structure of the developer service project and repositories required:

 

Developer Service Project – EmployeeRewards

 

Repositories -

  • EmployeeRewardsUI (Oracle JET code for UI)
  • EmpSOAServices(this will contain the two composites mentioned above)
  • EmpRewardsNodeREST (NodeJS code for external consumption)

 

Repositories.png

 

 

Now if we have to map the repositories to the application/projects in the respective IDEs as shown below:

mapping.png

 

The arrows in the diagram above map the IDE application/project hierarchy to the repository.

 

Have attached a video link for Oracle Developer Cloud Service overview.

 

**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.

Oracle Developer Cloud Service 16.4.1 has a fresh new UI and over 30 new features and improvements.

 

New Navigation List

 

Developer Cloud Service includes a more convenient vertical navigation list. Some features like the Maven repository browser have been moved to top level of the navigation list. The navigation list is collapsible to save on horizontal space when you are working with a specific feature area. The Home tab which shows the Activity Stream, Repositories, and Users has been renamed to Project.

 

odcs_projectpage.png

Merge Request Improvements

 

Merge Requests can now be linked to Build jobs. Seeing the status of relevant build and test jobs from within the Merge Request gives reviewers additional useful information as they review the code changes and give feedback. This also provides a convenient navigation to the build job history and console output.

 

Undelete a Project

 

Deleted projects are now preserved for a limited time and can be restored by the Developer Cloud Service Admin.

 

Calendars in Agile Boards

 

Agile boards can now be configured around working days and holidays with the addition of a configurable Calendar. These settings are factored into Sprint Reports and Velocity Chart calculations.

 

New Slack Webhook

 

A new webhook for Slack gives more fine grained control over the Activity Stream events that can be published to Slack conversations.

 

slack.gif

 

As always, more details on new features can be found on the What's New page and general Documentation.

In a new blog entry on the Oracle Cloud Developer Solutions

blog Abhishek Gupta-Oracle shows you how to include unit testing as part of your build process and how to see the results in your dashboard.

Learn more here:

 

Tracking JUnit test results in Developer Cloud service