Macaw + Oracle Cloud

Deployment Guide
 
 

Macaw Deployment Guide for Oracle Cloud
Release version: 0.9.3, Release Date: Feb 13 2017
This document describes deployment steps for Macaw Platform Software release v.0.9.3 for Oracle Cloud

Introduction

Macaw is a prescriptive Microservices development and governance platform. Macaw provides comprehensive toolset, many built-in core services, CI/CD integrations, management & operational capabilities and cloud agnostic deployment to accelerate enterprise cloud native journey.

Macaw Installation on Oracle Cloud
Macaw Overview
  • API modeling in JSON or Yang and Swagger documentation for Microservices, and collection of microservices packaged as blueprints.
  • Codegen, build and publish toolset for Microservice development. Java, JavaScript language for service implementation with support for more languages coming in future.
  • Many built-in core, essential services such as database (Cassandra, MySQL), logging (Elasticsearch), identity with multi-tenancy etc. for rapid application development and enables developers to focus on business logic.
  • Microservice metadata allows for standardization, auditing, policy enforcement and service discovery & provisioning. Microservice tag identifies a specific code commit and can be used for release/sprint progression, staging or production usage.
  • Macaw Microservices are packaged as Docker MDR (Meta Data Repository) and holds the service blueprints, Metadata information, including Docker tags for a specific service. Docker registry holds service container images.
  • Macaw service catalog serves as a marketplace and presents Microservices that are available in selected MDR/Docker repositories, which can be private, shared or public.
  • Macaw provides macaw CLI and a graphical web based console to deploy, scale and administer (monitor, troubleshoot) platform and the Microservices. Message co-relation and event visualization serve as essential troubleshooting and analytics tools.
  • From a runtime standpoint, Macaw is a distributed app running on top of one or more standalone Docker nodes that host Macaw Microservices. Messaging, routing and load balancing among the and frontend UI messages are load balanced through HAProxy. For service level resiliency, Macaw creates multiple instances of a Microservice and operates it as a cluster using its native placement, load balancing algorithm.
  • Macaw can be configured to send container placement request to a resource scheduler such as Kubernetes or Docker Swarm, which will assume responsibility of container placement and high availability.
Setup Instructions

For Oracle Cloud, Macaw Platform can be deployed from a pre-certified Macaw Oracle Image / binary posted and made available through Oracle Cloud Market Place.

Prerequisites to deploy Macaw Software Oracle Image
  • Pre-Certified Macaw Oracle Image/Binary - OEL 7.3 is prepackaged on Oracle Cloud
Oracle Cloud - System Requirements
  • Memory - Minimum 12GB
  • CPU - Minimum 2 Cores
Browser Versions

Macaw Platform supports the following browsers:

  • Google Chrome Version 51.0.x or above (Recommended)
  • Firefox 47.0.1 or above
  • Safari Version 9.1.1
Installation Steps

Macaw Platform Release, Version 0.9.3 is a 64-bit Image that can be hosted on Oracle Cloud and/or other 64 bit Linux OS Platforms.

Step-1.

Please use the appropriate URL for Oracle Cloud.
E.g. https://myaccount.cloud.oracle.com/mycloud/ or as provided by Oracle and as shown in the below screen capture.

After login into Oracle Cloud, select Oracle Compute Cloud Service as shown in the following screen capture.

Step-2

The above steps will allow you to login to Oracle Cloud Compute location with your registered data-center location; login to Oracle Cloud MyServices using your compute credentials as shown below:

Note: These credentials may or may not be same as your Oracle SSO. Please use the correct credentials to login to your compute cloud MyServices and the domain that was selected by you during your initial setup of Oracle Cloud MyServices.

Step-3

After successful login to Oracle Cloud MyServices, the dashboard is presented to you (or to end-user) as shown below:

Step-4

Open Service Console of your Compute widget as shown below:

Note: In the above MyServices dashboard, other Oracle Cloud Services are displayed. Elements in dashboard vary based on your selection of services from Oracle Cloud Environment. Check your environment and select the Compute platforms MyServices.

Step-5

The above selection will take you to Oracle Cloud My Services “Compute” dashboard from where you can select and deploy Macaw Oracle Image from the Market Place.

  • Select the Marketplace button as show below from the Cloud My Services landing page (shown below).

  • Enter "Macaw" text in the market place search field as shown below, to search for Macaw image

Oracle Market place will search and display Macaw provided binary image. Select the Macaw binary image and create a new instance as shown below:

Select the Macaw binary image and it will prompt to accept (a) Partner terms (b) Oracle terms.

Step-6

Use the instance creation deployment wizard to create new instance. During the deployment, please select the following configuration:

  • 2-OCPU
  • 15GB Memory

  • Select instance type and SSH key that you will use to connect to the instance as shown below.

Note: ssh key is the public key that is generated by using ssh-keygen or similar tool from SSH client side.

  • Public SSH Key(s) that you would want to use to connect to new instance

Note: "OPC" user is used as default to deploy and access Macaw Platform Software. An additional user "macaw" is also added for debugging purpose.

  • Next step is to select network credentials. You can select static or auto-generated as shown below.

  • Next step is to select firewall/security lists. Select ‘default’ firewall rules (which allows all ports for incoming public ip/ports).


Note: Macaw requires specific set of ports (incoming/outgoing) to be enabled; For more details, please refer to Macaw documentation for required list of ports etc. For proof of concept (PoC), it is suggested to have access to all ports to reduce deployment time.

  • Next step is to select the storage

  • Once the above steps are completed, deploy new instance and wait for Oracle Cloud to create a new instance and assign IP addresses etc.

Select ‘Create’ and let it run for few mins and go to next step.

  • Check the dashboard for ‘Ready’ label for your new instance.
Step-7

Once the instance is up and running, you will see the following screen on your compute dashboard:

Note: Please make a note of public and private IP addresses assigned to your instance.

Step-8

Login to your instance using any SSH enabled console (e.g. puTTy or any other utility that allows public/private key pair).

e.g.

ssh opc@129.144.12.213-i <id_rsa>

In the above example, ssh CLI utility is used to connect to the newly created instance with public IP Address “129.144.12.135”, and using a private key <id_rsa>. It is assumed that, public key is already deployed during macaw instance creation as described in Step-6.

Step-9.

Once you login to Macaw instance under Oracle Compute Cloud, verify the following from the command prompt using CLI.

[opc@f249b1 ~] $ sudo python -version

Python 2.7.5
[opc@f249b1 ~] $ sudo docker -version

Docker version 1.12.5, build 7392c3b
[opc@f249b1 ~]
[opc@f249b1 ~] $ macaw -version


Version: macawcli-0.9.3
[opc@f249b1 ~] $
[opc@f249b1 ~] $ export JAVA_HOME=/opt/java
[opc@f249b1 ~] $ export PATH=$PATH:/opt/java/bin
[opc@f249b1 ~] $ java -version


java version “1.8.0_102” Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

[opc@f249b1 ~] $
[opc@f249b1 ~] $ export ANT_HOME=/opt/ant
[opc@f249b1 ~] $ export PATH=/opt/ant/bin:$PATH
[opc@f249b1 ~] $ ant -version

Apache Ant(TM) version 1.9.7 compiled on April 9 2016
Note: You can set JAVA_HOME, ANT_HOME environment variables path in your ~/.bashrc for persistance across reboots.
Platform Installation Instructions

Use the certified tag : macaw-v0.9.3
Setup
[opc@f249b1 ~] macaw setup

FQDN of platform Host [localhost.localdomain]: <private IP>

FQDN or services hosts (separated if more than one): <private IP>

--------------------------------------------------------------------------------------------

Do you want NFS setup to be configured? This will require sudo access to the current user.

Please confirm to continue. [yes/no]: yes

--------------------------------------------------------------------------------------------

Note: <private IP> is the private IP Address from your instance during macaw instance creation time. You can find your instance private IP address from your compute cloud instance tab (or by selecting your newly deployed instance).

Bootstrap Macaw Infrastructure

[opc@f249b1 ~] $ macaw infra install --tag macaw-v0.9.3

Bootstrap Macaw Platform

[opc@f249b1 ~] $ macaw platform dbinit --tag macaw-v0.9.3
[opc@f249b1 ~] $ macaw platform install --tag macaw-v0.9.3

Bootstrap Macaw on-prem Tools

[opc@f249b1 ~]$ macaw tools install --tag macaw-v0.9.3 --service macaw-mdr
[opc@f249b1 ~] $ macaw tools install --tag 2.3.1 --service docker-registry
[opc@f249b1 ~] $ sudo mkdir -p /etc/docker/certs.d/<private IP>:5000
[opc@f249b1 ~] $ sudo cp /opt/macaw-config/certificates/ca/ca.crt /etc/docker/certs.d/<private IP>:5000/ca.crt

Note: In the above command, please replace the <private IP> with the correct private IP Address of your instance.

Note: The docker registry tag is pulled from the public docker registry.

Verify the Installation

[opc@f249b1 ~] $ macaw status

The above command will display the status of the Macaw infrastructure tools. Refer to the documentation or contact support team (support@macaw.io) for help with troubleshooting.

Login to Macaw Console

After the above steps are completed successfully, macaw console can be accessed using URL:

https://<public ip>

E.g:

https://129.144.12.213

Username : admin@macaw.io

Password: admin


Note: The above credentials are default and are set during the ‘macaw dbinit’ time.

Navigate to Services tab to view running services. Click on any of the service to view its details, or to browse/invoke APIs.

Fig. Macaw Console Login

Following screen is provided to show an example of some of the features that are provided for Macaw Platform

Fig. Microservice Clusters

Fig. Microservice Details

Fig. Microservice API