Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Run MySQL, if you don't have a local MySQL server running then you can create one with the following commands;

    Code Block
    $ docker run --name mysql -e MYSQL_DATABASE=keycloak -e MYSQL_USER=keycloak -e MYSQL_PASSWORD=29UTYZ735L0T8i7h6657Di71H -e MYSQL_ROOT_PASSWORD=password -d mysql
  2. If you want to create a database in an existing instead MySQL database then try the following; 

    Code Block
    create database keycloak;
    grant all on keycloak.* to keycloak@'%' identified by '29UTYZ735L0T8i7h6657Di71H';
    flush privileges;
  3. Add a DNS entry in your /etc/hosts file pointing to mysql.lin.nhs.uk  where aaa.bbb.ccc.ddd is the IP address that your MySQL server is listening on.

    Code Block
    $ echo "aaa.bbb.ccc.ddd mysql.lin.nhs.uk " >> /etc/hosts
  4. Start Keycloak using the docker-compose file for the stack https://github.com/Health-Education-England/TIS-DEVOPS/blob/master/docker/stacks/keycloak/docker-compose.yml 

    Code Block
    $ export KEYCLOAK_MYSQL=aaa.bbb.ccc.ddd
    $ cd $TIS-DEVOPS/docker/stacks/keycloak
    $ docker-compose up -d

...