mojaloop / project

Repo to track product development issues for the Mojaloop project.
Other
24 stars 15 forks source link

Local Windows Kubernetes Deployment - MySQL issues #877

Open lewisdaly opened 5 years ago

lewisdaly commented 5 years ago

Summary: When following the local deployment guide on Windows, the MySQL container for central-ledger doesn't seem to start up correctly.

Severity: Medium

Priority: Medium

Expected Behavior The mysql containers start correctly, and central-ledger is able to start.

Steps to Reproduce

  1. Using Docker for Windows, install the helm charts following the windows installation guide
  2. Observe that the mysql? central-ledger? container doesn't start correctly, with the container logs:
    Liveness probe failed: mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Back-off restarting failed container

Workaround

The current workaround for this problem is to manually configure the mysql container to allow for incoming connections:

(copied from slack)

Go to the

moja-centralledger-mysql-0

and in exec terminal first need to login to the root with password

After that need to grant privileges to the user using this command

GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
Ex: like this
GRANT ALL PRIVILEGES ON *.* TO 'central_ledger'@'%' IDENTIFIED BY 'oyMxgZChuu' WITH GRANT OPTION;

Then need to

FLUSH PRIVILEGES

Same thing need to do

moja-account-lookup-mysql-0

Specifications

Notes:

lewisdaly commented 5 years ago

As a sanity check, I tested this from scratch on MacOS, and couldn't reproduce.

Details:

mdebarros commented 5 years ago

A desktop has been set up for you so that you can test, reproduce and hopefully resolve this issue.

lewisdaly commented 5 years ago

We're run into a roadblock with the Windows instructions: the virtualized environment we set up on AWS to test the docker commands doesn't work as AWS doesn't support nested virtualization.

As a result, we can't get Docker for Windows and Kubernetes running on the machine.