ibm-cloud-architecture / refarch-cloudnative-kubernetes

Reference Implementation for Microservices based on Kubernetes and the IBM Container Service.
153 stars 109 forks source link

inventorydb en orderdb missing in chart directory #185

Closed HansDevOps closed 4 years ago

HansDevOps commented 5 years ago

Hi,

I am trying to understand how the helm charts are set up. I want to have the Orders microservice running separately. Of course it requires the Auth Service and Inventory Services as well, but if I install the orders microservice, there is no MariaDB or MySQL database in the chart. There seems to be someting in folders inventorydb and orderdb (according to this page), but I do not have these folders in my Microprofile branch.

Looking forward to your help and support.

Regards, Hans Verhoeven.

dshimo commented 5 years ago

Hi,

Thanks for pointing this out and writing an issue for it. We've gotten a previous notice about our documentation's consistency, so I'll take a deeper look into this and make the necessary corrections.

Thanks, David Shi

Hemankita commented 5 years ago

Hello @HansDevOps

Currently, we are using the official helm charts for MySQL and MariaDB. Now, the microprofile version of BlueCompute pulls them from https://github.com/helm/charts/tree/master/stable. Thanks for pointing out. Those instructions are old. I updated them now. Please go through them and let me know if you have any questions.

Thanks, Hemankita Perabathini

HansDevOps commented 5 years ago

Hi Hemankita and David,

I followed the updated instructions, but still have some questions.

  1. Step 3. Go to Inventory repo: $ cd inventory. That is not possible, as there is no inventory directory. Should it be: $ cd chart/inventory instead ?
  2. Step 4. I still do not understand how you combine the mysql within the package for the inventory service. Are you copying it in or doing something else? I understand that it is possible to use the official helm chart for mysql. However deploying mysql separately gives an error on a missing persistent volume claim. I assume that you run the $ helm package chart/inventory command in the root of the refarch-cloudnative-micro-inventory repository. The next $ cd .. seems to be not needed. Similarly I do not understand how it works with MariaDB for the Orders service. I think that the values.yaml for orders requires a similar update for mariadb as inventory for mysql.
  3. Step 5. There is no Catalog repository. It seems to be missing from .reporc in refarch-cloudnative-kubernetes/utility_scripts.

Maybe it is not possible to run the order microservice alone with the auth service. I was trying to get the orders service deployed via: $ helm repo add ibmcase-mp https://raw.githubusercontent.com/ibm-cloud-architecture/refarch-cloudnative-kubernetes/microprofile/bluecompute-mp $ helm install --name bluecompute orders Am I doing something wrong?

Hemankita commented 5 years ago

Hello @HansDevOps,

Step 3: You need not do cd inventory. The directory does not exist now and the chart resides in chart/inventory. Step 4: The bluecompute is pulling the charts for MySQL and MariaDB from the community helm repos. All the dependencies will be included in the https://github.com/ibm-cloud-architecture/refarch-cloudnative-kubernetes/blob/microprofile/docs/charts/bluecompute/requirements.yaml Step 5: Added the repo catalog in the .reporc (For Step 3 and Step 5, modified the docs.)

If you are trying to run the orders independently, you need MariaDB, Orders, Auth and Keystore to be up and running. Also, it needs the inventory and its dependencies for the stock to update.

helm install --name keystore services-bc-mp/keystore
helm install --name auth services-bc-mp/auth
helm install --set travis=true, minikubeIp=<your release name>-rabbitmq --name inventory services-bc-mp/inventory
helm install --name my-release --set mysqlRootPassword=password,mysqlUser=dbuser,mysqlPassword=password,mysqlDatabase=ordersdb stable/mariadb
helm install --set travis=true --set service.minikubeIp=$MINIKUBE_IP --name < your release name> ./chart/orders/

All of these are packaged together and you can have a look here https://github.com/ibm-cloud-architecture/refarch-cloudnative-kubernetes/tree/microprofile/docs/charts/bluecompute to understand how these charts are packaged together.

Thanks, Hemankita Perabathini

HansDevOps commented 5 years ago

Hi Hemankita, Many thanks for your quick response! You have provided a lot of additional information so that I will be able to fully understand how it works. The Bluecompute example is really amazing. It has a lot of cool technology and solutions in it. Many thanks for your help, Hans.