jueves, junio 07, 2018

Spring Boot + Cockroach DB in Kubernetes/OpenShift


In my previous post, I showed why CockroachDB might help you if you need a cloud native SQL database for your application. I explained how to install it in Kubernetes/OpenShift and how to validate that the data is replicated correctly.

In this post, I am going to show you how to use Cockroach DB in a Spring Boot application. Notice that Cockroach DB is compatible with PostgresSQL driver, so in terms of configuration is almost the same.

In this post, I assume that you have already a Cockroach DB cluster running in Kubernetes cluster as explained in my previous post.

For this example, I am using Fabric8 Maven Plugin to smoothly deploy a Spring Boot application to Kubernetes without having to worry so much about creating resources, creating Dockerfile and so on. Everything is automatically created and managed.

For this reason, pom.xml looks like:


Notice that apart from defining Fabric8 Maven Plugin I am also defining to use Spring Data JPA to make the integration between Spring Boot and JPA easier from the point of view of the developer.

Then you need to create a JPA entity and Spring Data Crud repository to interact with JPA.

Also, we need to create a controller who is responsible to get incoming requests, use the repository to make queries to DB and return results back to the caller.

Finally, you need to configure JPA to use the desired driver and dialect. In case of Spring Boot this is done in application.properties file.


The most important part here is that we need to use the PostgeSQL94 dialect. Notice that in url, we are using the postgresql jdbc url form. That's fine, since Cockroach uses the Postgres driver.

Now we need to create the database (customers) and the user (myuser) as configured in application.properties. To make it so, you just need to run cockroach shell and run some SQL commands:


Finally, you can deploy the application by running mvn clean fabric8:deploy. After that, the first time might take longer since needs to pull Docker images, you can start sending queries to the service.

As you can see it is really easy to start using a cloud-native DB like Cockroach DB in Spring Boot. If you want you can do exactly the same as in my previous post and start running queries to each of the nodes to validate that data is available correctly.

Code: https://github.com/lordofthejars/springboot-cockroach

We keep learning,
Alex.
Dôme épais, le jasmin, à la rose s'assemble, rive en fleurs, frais matin, nous appellent ensemble. (Flower Duet - Lakmé - Leo Delibes)
Music: https://www.youtube.com/watch?v=Vf42IP__ipw
Follow me at https://twitter.com/alexsotob



92 comentarios:

skan81 dijo...

voiture occasion
discotheque a Paris
discotheque a Paris
voiture vintage

bet paris
entreprise genie energetique
renovation appartement paris
prix ouverture mur porteur
ouverture mur porteur prix

skan81 dijo...


جراحة التجميل تونس
chirurgie esthetique
greffe de cheveux en tunisie
changer les protheses mammaire
reduction des seins tunisie
operation esthetique tunisie

svrtechnologies dijo...

I just loved your article on the beginners guide to starting a blog. Thank you for this article. kubernetes certification training and devops training courses with highly experienced faculty.

hrroman dijo...



We Fullassignment.com is among the best companies on the Programming Database and IT Assignments Help writing market. We offer top-notch essays, Online Programming Assignment Help research papers, thesis and other types of works that can be assigned to you at a high school or college. We also provide Java Programming Assignment Help from our experts. for more information contact us +16692714848.

Anónimo dijo...

🔥 ☑️MEET THE REAL HACKERS☑️ 🔥

It Tears me Up Whenever we receive complaints from People About Their Experience With the Hackers They Met Before They Heard about us.
These Days There Are alot of Hackers Online, You Just Have to Be Careful about who you meet for help, because many people now don't really know who to ask for help anymore but there is an actual solution to that which I am giving you for free, Trust Me You Don't Wanna go out there seeking for Hackers Yourself, Because the probability of getting a Real Hacker Out there Is Very Slim . ❌❌ ❌ Most Of Them are actually not who they say they're, they are just out there to Rip people Off, Trust Me You Don’t Wanna Risk It. You Can Always Identify Them With Their False Advertisements and False Testimonies Trying To Lure you Into their Arms, And most of them use yahoomails, gmails and other cheap email providers which could easily expose their vulnerabilities, Please Don’t Fall For Them🚷 Come To Think Of It, Why would a Legit Hacker Be using a gmail or a cheap email provider that exposes his vulnerabilities????⚠️⚠️⚠️
Well, Our Purpose Here Is To Link You Up With Top Notched Legit Hackers With Great Online Reputations and Impressive LinkedIn Profiles That’ll Blow Your Mind. Trust Me, You Don’t Wanna Miss This Great Opportunity.

🔥 ☑️ COMPOSITE CYBER SECURITY SPECIALISTS are the Answers to your PRAYERS . We are here to Provide you with The BEST and FASTEST Hackers that would get your Job Done as Fast as possible. 🔥 🔥


☑️All our Specialists are well experienced in their various niches with Great Skills, Technical Hacking Strategies And Positive Online Reputations And Recommendations🔘
They hail from a proven track record and have cracked even the toughest of barriers to intrude and capture all relevant data needed by our Clients. 🔥 🔥

We have Digital Forensic Specialists⚡️, Certified Ethical Hackers⚡️, Software Engineers⚡️, Cyber Security Experts⚡️, Private investigators and more⚡️⚡️. Our Goal is to make your digital life secure, safe and hassle free by Linking you Up With these great Professionals such as JACK CABLE, ARNE SWINNEN, SEAN MELIA, DAWID CZAGAN, BEN SADEGHIPOUR And More. These Professionals are Well Reserved Professionals who are always ready to Handle your job with great energy and swift response so that your problems can be solved very quickly.
All You Need to Do is to send us a mail and we’ll Assign any of these specialists to Handle your Job immediately. ⚡️⚡️⚡️

☑️ Below Is A List Of Our Major Services:
▪️ FUNDS RECOVERY ON BITCOIN SCAM, INVESTMENTS, BINARY OPTIONS TRADING and ALL TYPES OF SCAMS.
▪️ WEBSITE AND DATABASE HACKING 💻
▪️ CREDIT REPAIR. 💳
▪️ PHONE HACKING & CLONING (giving you 📱 Unnoticeable access to everything Happening on the Target’s Phone)
▪️ CLEARING OF CRIMINAL RECORDS ❌
▪️ SOCIAL MEDIA ACCOUNTS HACKING 📱
▪️RECOVERY OF DELETED FILES 📤
▪️LOCATION TRACKING 📌
▪️BITCOIN MINING ⛏ And lot More.

✅ COMPOSITE CYBER SECURITY SPECIALISTS are Basically the ANSWERS to your PRAYERS. Trust Me, You Don’t Wanna Miss Out This Great Experience.

📩CONTACT US TODAY:
Email:
composite.cybersecurity@protonmail.com

🔘2020 © composite cybersecurity specialists
🔘Want faster service? Contact us!
🔘All Rights Reserved ®️










































Whole Sales King dijo...

Very nice Article I love it and want to share with my friends
Artificial turf supplier Saskatoon

robin.smithsters dijo...

If you are wondering how to Grow My Grade, you are just a click away from awesome learning documents like Fundamentals Of Cost Accounting 5th Edition Test Bank make the best deals on test banks and solution manuals right now with our assistance.

Okseoabhinav dijo...

Thank you very much for giving space to us to express our feeling and thoughts about above information. I think you will keep updating and changing these information time to time if there is need to change.
best accounting company for small business, international taxation consultant, Ind AS in India , read more , internal auditing assurance consulting india, accountant service.

Kavita Sharma dijo...


____???????
___??????????
___?????????????
___????????????
__?????????????
_?????????????
_?????????????
_??18+ Channels????
??????????????????????
????????18+Channels ??????
??????????????????????????
_??????__????????????????
___????____?????????????
___????_____??????????
___????_____??????????
____????____??????????
_____???____?????????
______???__??????????
_______??????????????
________??????????????
_______???????????????????
_______?????Indore Escorts ????
_______?????????????????????????
_______???????????????????????????
________??????????____?????????????
_________????????_______???????????
_________????????_____???????????
_________???????____??????????
_________???????_??????????
________???????????????
________????????????
________??????????
_______?????????
_______??????
______??????
______??????
______??????
______?????
______?????
_______????
_______????
_______????
______??????
_____????????
_______|_?????
_______|__??????

Call girls in mahipalpur dijo...

Delhi Call Girls Agency, we are one among the various escort organization providing food young ladies for sexual administrations in Delhi and NCR. Our administrations are expanded all over Delhi and edges. We keep up unmistakable class of young ladies at all the majority of noticeable districts of the Delhi to guarantee our customers immediate and wanted administrations. Our Call Girls in Delhi are best class of young ladies giving extreme joy and furthermore moving message to not to surrender except if you achieve your point. Our Escort Service in Delhi attempt to change viewpoint towards life however yes they show the procedures to appreciate life and grin against the odd of life. Likewise become familiar with the procedures to make meeting more acceptable and interesting with escort young ladies.

Ankita Tiwari Kolkata Escort Service In Call Girl dijo...


SEALDHA INDEPENDENT ESCORTS
SEALDHA INDEPENDENT ESCORT

Gurgaon Escorts Service dijo...

Put your routine aside and come enjoy pleasant moments with me. It will be a real pleasure for me to treat you like a king and satisfy your warm desire. My service is very relaxed and I totally immerse myself in my meetings.
Escorts Service in Gurgaon
Call Girls in Gurgaon
Escorts in Huda City Center
Aerocity Escorts
Mahipalpur Escorts

soniya dijo...

Hey guys, I am your perfect company, you will love my service, we will have pleasant moments together. I am a delight in bed, I love to give pleasure and spend warm and pleasurable moments with guys like you.
Delhi Escorts
Delhi Call Girls
Escorts in Saket
Gurgaon Call Girls
Mumbai Escorts
Call Girl in Jaipur
Mumbai Call Girls

soniya dijo...

I want you to enjoy me and have a rich time with a good sex that you will surely love. I'm a delight in bed, I'm sure you'll enjoy my company a lot. I'm going to do it in a way that's going to drive you crazy and make you want to come back.
Escorts in Gurgaon
Kolkata Escorts
Escorts in Jaipur
Hyderabad Escorts
Bangalore Escorts
Escorts in Goa

data togel tercepat dijo...

live draw sdy

world wide escorts directory dijo...

I am a super discreet woman when it comes to reaching the place of our meeting.
Escorts Service
Call Girls

Ninja Turtle dijo...

click on one of the sites below to get a variety of the best tips and tricks in life. data pengeluaran togel

Ninja Turtle dijo...

click on one of the sites below to get a variety of the best tips and tricks in life.

pengeluaran bullseye

agen togel terpercaya

RG dijo...

result togel hari ini Result Togel Hari Ini adalah situs khusus yang selalu menyediakan beberapa daftar result nomor togel , yang menayangkan berbagai angka keluaran togel terlengkap. semua hasil angka keluaran nomor yang di tayangkan adalah asli dan benar keasliannya dan sangat akurat dari setiap website official yang sesuai dengan pasaran tersebut.

Agen Togel Online dijo...

Data baru pengeluaran hongkong atau yang disebut data hk merupakan hasil keluaran nomor togel Hongkong terbaru yang hasil keluarannya diambil dari situs hongkongpools.

Masashi dijo...

Good site, hopefully useful for all webmasters, and thank you for joining and commenting on your comfortable site.
Bocoran Hk

bamgosoowm dijo...

I am impressed with this website, really I am a big fan.

my web page; 안마

Charlotte Paisley dijo...

I am new here but they are offering exactly what I am looking for. I want an Economics assignment help. I am in the United States, and therefore, I don’t know whether they offer the service here. If you do, let me know how much it will cost me for Economics homework help. I am waiting for their response

Edison hope dijo...

I was reading some of your material on this website and I think this internet site is really informative!!! Keep on putting up. Eligible citizens are required to complete a simple online visa application to Turkey form with personal and passport information., select the purpose of their visit, answer a few simple health and security-related questions, and pay the E visa Turkey cost. You can pay a fee online.

CLICKME dijo...

Thanks for sharing excellent information. Your web-site is so cool. I am impressed by the details that you’ve on this web site. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for extra articles 립카페

MY SITE dijo...

Amazingly edifying and steady for me. I regard the gainful information you offer in your articles. An obligation of appreciation is all together to post 외국인출장

VISIT ME dijo...

Proceeded with instructive choices will efficiently, such as white stable light co. Great on sign in should get into the worker entrance will give of installments. Multi month following the left portion of the key phrase. As soon as you can permit you need to share your company related to love during the accreditation. Entryway establishment direct you will need to land their standing chances to your 스포츠마사지

Rian dijo...

virtual event Speaking to Microsoft’s ambitions for product improvements, Bohn’s 2019 article noted that “Kipman talks a lot about distinguishing between identically boring conference rooms that are in the same spot on different floors.” meeting invitations examples, company gift bags and online event registration and payment

PREDIKSI HK dijo...

Multi month following the left portio
Live Draw Taiwan
Live Draw SGP
Live Draw HK
Live Draw SDY

Tom dijo...

Thank you😊 Before applying for Kenya visa on arrival you must check the eligible countries for Kenya Visa. To verify that Are you eligible to get the Kenya visa or not?

JURUTOGEL dijo...

Kumpulan daftar situs BANDAR TOGEL TERPERCAYA yang sudah kami pastikan valid dan sangat bonafit.

Unknown dijo...

Pilihan terbaik AGEN TOGEL TERPERCAYA bagi anda para pemain togel yang gemar menebak angka keluaran suatu pasaran togel tertentu.

RITA KARLINDA dijo...

Kumpulan terbaik dan teraman SITUS TOGEL TERPERCAYA di Indonesia yang dibuat oleh para Jurutogel.

Marianingsih Carrey dijo...

We suggest you the biggest and trusted BANDAR TOGEL in Indonesia with complete pools and highest prize pools.

Shiela Garzae dijo...

Your place is valueble for me. Thanks!

Yarabook.com
Information
Click Here

Unknown dijo...

Situs nomor 1 keyword LIVE DRAW HK di Indonesia dengan kecepatan update terbaik dan tercepat setiap hari yang kami pastikan valid.

Unknown dijo...

Mesin pencarian dengan sangat cepat memperlihatkan blog - blog LIVE DRAW SDY terbaik dan tercepat setiap harinya ketika anda melakukan pencarian.

Unknown dijo...

DATA SGP - Situs pengeluaran angka togel singapore terlengkap dan terbesar di Indonesia yang dibuat untuk para pecinta Togel Indonesia.

Unknown dijo...

Portal digital LIVE DRAW HK : pengeluaran angka togel hongkong tercepat dan terbaik di Indonesia.

Unknown dijo...

Blog LIVE DRAW SYDNEY merupakan blog yang mengadakan pemutaran langsung angka togel sydney setitap hari berupa angka yang dibuat dengan system tampilan sesederhana mungkin.

Unknown dijo...

Segera daftarkan diri anda dan hanya bermain di situs BANDAR TOGEL terbesar dengan pasaran togel yang lengkap , siap dimainkan dan hadiah togel terbesar dengan jaminan valid.

Antonio Rainey dijo...

Hello there, simply turned into aware of your blog through Google, and found
that it is really informative. HOW TO OBTAIN A FAKE IDs ONLINE THAT WORKS I’m going to be careful for brussels. I will appreciate when you proceed this in future. Numerous people shall be benefited out of your writing. Cheers Y’all don’t forget to join this DMV EXPERTS TELEGRAM GROUP for more information

Jone Marsh dijo...

The Contract Law Assignment Help service has a great team of law subject matter experts who are well proficient in this field of assignment writing. Thus they can assist you to complete your assignment with more accuracy.

Assignment Help Pro dijo...

As there are several websites offering help services to students worldwide who can offer you similar samples as well they have even done for their various clients within in your country. These assignmnet helpers providers also offer you the various guideline and templates that may guide you in doing your homework comfortably.

+91-9811190633, Escorts Near DoubleTree by Hilton Hotel Gurgaon – New Delhi NCR dijo...

A model is a person with a role either to promote or advertise commercial products and services or to serve as a visual aid for

people who are creating works of art or to pose for photography. Though models are predominantly female models, especially to

model clothing. Models may work professionally or casually.

Guide in Novotel Aerocity
Guide in Paharganj
Guide in Pullman Hotel
Guide in Red Fox Hotel
Guide in Aerocity
Guide in IBIS Hotel
e^scorts in Aerocity
e^scorts in Holiday inn
e^scorts in IBIS Hotel Aerocity
e^scorts in JW Marriott Hotel

Aerocity

Dewa Togel dijo...

Hi bro, i see this blog very good. Thanks ya

bandar togel terpercaya

Jone Marsh dijo...


Nice Blog for Qatar Student. It may take some time at first but then you can enjoy the services of the best agency throughout the year. Great Assignment Help provides the best service for other company.

Legend dijo...

Mellor, Louisa. ten in the bed "CBeebies Bedtime Stories and 'the Tom Hardy effect'". Den of Geek. Retrieved 14 June 2021.

Legend dijo...

Supportable Packaging games boxes Dealing with the climate is fundamental, and we must be certain that each individual is having their influence on the general public.

Legend dijo...
Este comentario ha sido eliminado por el autor.
My Site dijo...

Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.
토토
경마사이트
경마

My Site dijo...

Thankyou for giving me useful information.
Please keep posting.
바카라사이트
토토

My Site dijo...

Yes i am totally agreed with this article and i just want to say that this article is very nice and vey informative. More blogs please.
majortotositepro2
racesitepro2
oncasinositenet02
totopickpro02

Mia Oscar dijo...

Great Nice post keep writing. What should be included while doing language analysis, here are the point conclusion or final words are the same so you can analyze language only on one condition is that first, you must know basic core knowledge of that language. You have information on its numerous aspects, different characteristics, and its techniques too. And take a look at my blog post.

Mia Oscar dijo...

Great post, your blog is too long and you share quality information in an effective manner. Do you have women's health nursing research topics by experts? Here I gonna share with you unique topics on nursing research topics. Veginal atrophy cause, female sexual health disorders in adult age, the right treatment for ovarian disorders, menopause challenges, how to prevent from pregnancy, autoimmune diseases or its treatment breast cancer treatment, reproductive endocrinology and modern neonatal, etc. These are a few topics on women nursing if are you looking for more topics kindly reach out to us or our expert helpers. We are happy to guide you in your academics.

Kaylee Brown dijo...

You might collect a dissertation that is due in a couple of days but doesn't have the time to complete it. You can use a dissertation help service to have an dissertation expert work on your dissertation right away, rather than spending sleepless hours on it. You can focus on other things while the dissertation expert online completes the task and sends it to you before the deadline.

Assignment Help Pro dijo...

Assignment help services in Australia help students to complete their assignments within a given timeframe. Your writing skills will gradually improve if you follow and apply the expert's style in your assignment writing. You should practice regularly in order to improve them.



Leo Oliver dijo...


Excellent, you are accessible from achieving the highest possible grades on your tasks and assignment. Our assignment experts ensure that your Matlab Assignment Help is completed as quickly as possible, allowing you to improve your writing and comprehension abilities. MATLAB is adapted to your way of thinking and working, so whether you're a student, an individual, or an expert, you can learn.

Kontol dijo...

JURUTOGEL give u praise to this masterpiece!

ONIL CHRISTIAN dijo...

Hello sir, Hope your evening is going well. Do you need an evisa to India? You can find more information about e visa to India on our website about India e visa.

Megha Malik dijo...

Hi, I'm Megha Malik! here to give sensual pleasure to my clients for which many people are still standing in queue. Make your night lusty with her at your place. I am the kind of dynamic girl who can put a huge smile on your personality. I generally prefer gentlemen who understand it honor their female companions. I have an apartment, so let’s go and enjoy.

Female companions in Delhi

sportstotohot.com dijo...

Here are several of the sites we advise for our visitors
토토사이트

racesite.pro dijo...

Hi there, I enjoy reading all of your article.

경마

baccaratsite.info dijo...

I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing. 바카라사이트인포

casinositetop.com dijo...

This is such great work! Interesting to read for sure. 바카라사이트

pachinkosite.info dijo...

I need to to thank you for this great read!! I definitely enjoyed every little bit of it. I have got you bookmarked to check out new things you post. 슬롯머신

syair togel dijo...

thabnks you kode syair hk

SIZUKA dijo...

Baca Dan Cermati

forum syair hk

Result Sydney

prediksi syair hk

forum syair sdy

syair togel dijo...

kode syair hk

mbah semar sdy

mbah syair sdy

mbah syair hk

mbah syair sgp

syair togel dijo...

forum syair sdy

forum syair hk

Hihihi dijo...

슬롯커뮤니티

Krista Williams dijo...

We are providing homework help service to the students, so that they can understand their homework properly. Our homework help service assists them in completing all kinds of homework and essays within the specified time. So that they can get desire grades!

angle krew dijo...

Such a very informative article... Thanks for sharing this information... Foreign travelers who want to visit India for vacation, sightseeing, and purpose to enjoy need a tourist visa India, for more information, click and check.

Unogeeks dijo...

very informative. Mulesoft Training

Siluman Ss dijo...

forum syair hk

forum syair sgp

syair sgp

syair sdy

kode sdy

data sdy

data sydney

https://linktr.ee/syairhk2022

Samuel dijo...

This content is very helpful and generic. You may also try Assignment Help Online which is the best platform for completing assignments. This online portal is very effective and provides quality reports at low prices. This is the place where experts mainly focus on the content quality rather than just providing the paraphrased content with quantity.

syair togel dijo...

hello !

mbah semar sdy

prediksi syair hk

prediksi syair sgp

prediksi mbah syair

forum syair sgp

forum syair sdy

Mbah Togel dijo...

hello my friend

 

live draw china

live draw bullseye

grafik hk

bola jatuh hk

result taiwan

syair togel dijo...

hello !

live draw china

live draw hk

data hk

data sgp

data sdy

toto macau dijo...

Cek My link..

Live Draw Sydney

Prediksi SDY

Jika Anda mencari Prediksi Toto Macau , maka Anda bisa cek kode syair macau disini Syair Toto Macau

Data HK

Syair HK

syair togel dijo...

hello !

data sgp

live draw china

live draw hk

Edison hope dijo...

Hello friends, many people ask, how can I apply for a visa? You can apply for an evisa apply online. And your visa processing time depends on your nationality and your visa type.

syair togel dijo...

Hi.

live draw cambodia

live draw hk

live draw china

data sgp

data sdy



Unogeeks dijo...

good and fascinating post. Post regularly. Many thanks for sharing.Oracle Fusion SCM Online Training

toto macau dijo...

tq info

Prediksi Sdy

Live Draw Toto Macau

Live Draw Taiwan

Paito Hk

Paito Sdy

Live Draw Poipet

Shio Togel

Spy Data dijo...

Link Bagus

syair sdy

syair sgp

syair hk

VIRAL FOR YOU dijo...

fafa191
fafa191
fafa855
fafa191
coin365bet
scr99
scr99
scr99

Resep Masakan dijo...

Data Sydney
Prediksi

Mark Wood dijo...

I want to stress how truly remarkable this post is. I'm filled with a profound sense of gratitude and wish to extend my heartfelt thanks for the exceptional content you've offered. 7 Best Doner Kebab in Istanbul. Istanbul is renowned for its delicious Doner Kebab, and here are seven of the best places to savor this iconic Turkish dish. From the historic Sultanahmet Koftecisi to the vibrant streets of Taksim, these eateries offer mouthwatering Doner Kebabs.

PREDIKSI HARIAN HK MALAM dijo...

Live Draw Cambodia

Syair Macau

Syair Hk

Syair Cambodia

Syair Taiwan

Angka Keramat

PREDIKSI HARIAN HK MALAM dijo...

Live Draw Cambodia

Syair Taiwan

Live Draw Taiwan

Syair Cambodia

Angka keramat

Syair macau

Syair Toto dijo...

Syair Hk

Syair Sgp

Syair SdySyair Macau

Prediksi Hk

Prediksi Sgp

Prediksi Sdy

Prediksi Macau

Prediksi Taiwan