From March 2019

Microservices Versioning and the “Database per Service Pattern” with Oracle Autonomous Database


The database per service pattern with an Oracle database can be accomplished easily with one instance of Autonomous Database per microservice, a very easy to use and maintain database (relational and JSON).

clon1

But not only is easy to use and maintain because you don’t have to deal with administration tasks or manage different technologies for persisting data, in fact you have a very easy mechanism for versioning your microservices in parallel with your data: just by cloning the instance.

You can clone both with the dashboard or with commands that can be easily put in your CD pipeline.

clon2

oci db autonomous-database create-from-clone --compartment-id <mycompid> --cpu-core-count 1 --data-storage-size-in-tbs 5 --admin-password <password> --source-id <dbsourceid> --clone-type FULL --db-name <newname>

As an example, in the range of  a 4-5 minutes you can clon a 5TB database ready to be connected to a new version of your microservice.

clon5

Conclusion

With Oracle Autonomous Database you avoid the versioning anti-pattern quickly and easily.

clon3.jpg

And  what about putting an API Platform in between the users and the microservices? Think about it!

clon6

That’s all folks!

Enjoy 😉

Related content:

Microservices with Oracle

Microservices and SODA: JSON Data Stored in an Oracle Database Accessed through​ REST or Java

Creating a Java Microservice with Helidon/Microservice Archetype Deployed in Kubernetes

The Increasingly Important Role of API Management in the Adoption of Integrated SaaS Solutions Together with the Onprem and Third-party Systems

 

 

 

CD (Continuous Delivery) with Wercker Pipelines in 15 minutes


Wercker is a continuous delivery  “YAPT” pipelines tool…yes, Yet Another Pipelines Tool, ja ja  😉

Well, Wercker is easy to use, let’s have a look.

  1. Create a project for containeraizing something
  2. Create a Wercker account if you don’t have one
  3. Connect Wercker with a repo under [Settings]w5
  4. Push your code to a repo, such as GitHub, BitBucket, Oracle Developer Cloud Service,…
  5. Create a new Wercker application w2
  6. Select one of the supported repos and click [Next]w3
  7. Select one of your projects and click [Next]w6
  8. Select the following w10
  9. Finally click [Create]w8
  10. In the new created application page, select the language of your app and click copy to clipboard w12
  11. Add the code to a file named wercker.yml, comment the test line and push the file to the repo w14
  12. Take a look to the build status w18
  13. Add environment variables for your login to a docker V2 compliant repository w20
  14. Add the following at the end of wercker.yml deploy:
    steps:
    
    - internal/docker-build:
    
    dockerfile: Dockerfile
    
    image-name: kfkconsumer-node
    
    - internal/docker-push:
    
    username: $USERNAME
    
    password: $PASSWORD
    
    tag: mytag
    
    repository: javiermugueta/kfkconsumer-node
  15. Create new pipeline and name it deploy x1
  16. Add a new step with the deploy pipeline created previously
  17. Make changes to project, push and see what happens

  18.  

That’s all!

😉 Enjoy

Oracle Cloud Infrastructure Plugin for Grafana


graf.png

Install Grafana locally as shown here

Install OCI CLI, follow this post as an example

Install OCI plugin

grafana-cli plugins install oci-datasource

brew services restart grafana

Create a dashboard

Select Region, Compartment, etc…

oci2

oci5.png

Tha’s all!

Enjoy 😉

Configuring Grafana for Oracle Kubernetes Engine


apple devices books business coffee
Photo by Serpstat on Pexels.com

INSTALL GRAFANA LOCALLY

brew install grafana

http://localhost:3000

INSTALL K8S PLUGIN FOR GRAFANA

grafana-cli plugins install grafana-kubernetes-app

brew services restart grafana

INSTALL PROMETHEUS ON OKE

helm install --name my-prometheus stable/prometheus

export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")

kubectl --namespace default port-forward $POD_NAME 9090

CONFIGURE PROMETHEUS DATASOURCE

prom

CONFIGURE K8S DATASOURCE

k8s.png

USE IT

This slideshow requires JavaScript.

That’s all!

Enjoy 😉