Exploring Oracle Cloud capabilities as a developer

Hello everyone,

This is the first post in a blog series aimed at exploring Oracle’s various cloud capabilities available for developers. If you wish to join me along this journey, simply head to OTN and register an account (avoid popular domains e.g. gmail). Then, request a PaaS and IaaS trial.

Our objective is to create a RESTful service that exposes data from a MySQL database. We will use Spring Boot for this series. In the future, I hope to give other frameworks such as Dropwizard and Ratpack a spin as well.

Create the project in Developer Cloud

  1. Login to Developer Cloud
  2. Create a new project in Developer Cloud. Let’s call it springmedrec
  3. Select “Initial Repository”
  4. Select your preferred Markup format and Click Finish.

Create your project in your IDE

  1. In Netbeans, select Maven > Spring Boot Initializr (available as a plugin in Netbeans)
  2. Enter the details:
  3. In dependencies, select the following options (we’ll add more later):
    1. DevTools
    2. Lombok
    3. Web
    4. JPA
    5. H2
    6. MySQL
    7. Actuator
  4. Finish.

Add Version Control

  1. Once the project is created, you need to initialize your local repo:
    1. cd medrec
    2. $ git init
    3. If you’ve got the git plugin for Netbeans, you can use it too. I prefer to use the terminal.
  2. Start tracking your code
    1. $ git add . && git commit –am ‘first commit’
    2. With Spring Boot Initializr, you can safely do this in the beginning as it will include a .gitignore with the necessary file formats to ignore.
    3. If you are using another framework, language or build tool, you’ll find this github project to be useful: https://github.com/github/gitignore. It includes a very useful list of .gitignore files that you can readily copy and use.
  3. Add your remote repo:
    1. $ git remote add devcs https://<devcloudurl>/springmedrec.git
    2. devcs is the short name I’m using for the remote repository in Developer Cloud.
  4. Push to devcs:
    1. $ git push – -force devcs master
    2. As this is the very first commit, we’ll just force the push to devcs.

Add a build job

  1. Create a build job
    1. In DevCloud, click on Build
    2. Click on New Job
    3. Give your build job a name
    4. Click on source control tab
    5. Select git > springmedrec.git
    6. Click on Triggers and check ‘Based on SCM polling schedule’
    7. Click on Build Steps
      1. Add a build step > select Maven 3
    8. Save and click on ‘Build Now’
    9. Verify your build is successful.

3 thoughts on “Exploring Oracle Cloud capabilities as a developer”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: