# Part 1

## 1. Quickly install dependencies

*This step lets you quickly install App Id*

```
$ cd example-bank/scripts
```

Log in your IBM Cloud account with the `ibmcloud` cli

*Make sure to use your personal account when it asks you.*

```
$ ibmcloud login -u YOUR_IBM_CLOUD_EMAIL
```

Create an App ID instance using the script.

```
$ ./createappid.sh

App ID instance created and configured
Management server: https://**.appid.cloud.ibm.com/management/v4/**
Api key:           YOUR_API_KEY
Auto-generated
appid-example-bank-credentials
```

Then export the App ID instance's management server and the API key.

```
$ export MGMTEP=https://**.appid.cloud.ibm.com/management/v4/**
$ export APIKEY=YOUR_API_KEY
```

Log in with the OpenShift cluster provided for you using the OpenShift console. On the upper right corner, click your account and then click on `Copy Login Command`. This should open a new window and show you the command to login with the `oc` cli

![IBM Cloud dashboard](/files/-MHWIeLpIf5GhiclvCJc)

![OpenShift Console](/files/-MHIA4zSZazmPPse2Qrz)

Create secrets using the script below. This creates the necessary secrets in your OpenShift cluster

```
$ ./createsecrets.sh $MGMTEP $APIKEY
```

Deploy the front end microservice from the Identity Management Workshop

```
$ cd ..
$ oc apply -f deployment.yaml
```

## 2. Build Java microservices

Build the microservices - user, transaction, and erasure microservices.

```
$ cd bank-app-backend
$ mvn -pl :transaction-service -am package
$ mvn -pl :user-service -am package
$ docker build -t $DOCKER_HUB_USER/lab-transaction:1.0 transaction-service
$ docker build -t $DOCKER_HUB_USER/lab-user:1.0 user-service
```

Then, build the erasure service

```
$ cd ../bank-user-cleanup-utility
$ mvn package
$ docker build -t $DOCKER_HUB_USER/lab-erasure:1.0 .
```

You can now push the container images you built

```
$ docker login
$ docker push $DOCKER_HUB_USER/lab-transaction:1.0
$ docker push $DOCKER_HUB_USER/lab-user:1.0
$ docker push $DOCKER_HUB_USER/lab-erasure:1.0
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ibm-developer.gitbook.io/digital-developer-conference-hybrid-cloud/microservice-workshop-oss/oss/part1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
