You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-advanced-1/inventory-cd/index.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,11 +106,11 @@ To create a project, do the following:
106
106
### Configure the GitOps repo for Inventory Management service
107
107
108
108
- Clone the GitOps repository you created earlier, copy the folder `templates/app-helm` to the root of the repository and give it a name that matches the Inventory Management service component
109
-
(e.g. `inventory-management-svc-{initials}`)
109
+
(e.g. `inv-svc-{initials}`)
110
110
111
-
- Update `inventory-management-svc-{initials}/Chart.yaml` and update the name to match the directory name
111
+
- Update `inv-svc-{initials}/Chart.yaml` and update the name to match the directory name
112
112
113
-
- Update `inventory-management-svc-{initials}/requirements.yaml` with the following values:
113
+
- Update `inv-svc-{initials}/requirements.yaml` with the following values:
114
114
115
115
- `name` - the name of helm chart/image. This should match the folder name
116
116
- `version` - the version number of the helm chart
@@ -119,7 +119,7 @@ To create a project, do the following:
@@ -132,13 +132,13 @@ To create a project, do the following:
132
132
- Run `kubectl get configmap/ibmcloud-config -n tools -o yaml` to print the configuration information
133
133
for the cluster
134
134
135
-
- In `inventory-management-svc-{initials}/values.yaml` replace `<app-chart-name>` with the directory name. Replace `ingressSubdomain` with the value from the previous step. Update `tlsSecretName` with the value from the previous step. The result should look something like the following
- In `inv-svc-{initials}/values.yaml` replace `<app-chart-name>` with the directory name. Replace `ingressSubdomain` with the value from the previous step. Update `tlsSecretName` with the value from the previous step. The result should look something like the following
**Develop and deploy the BFF component of the inventory application**
3
3
4
4
The Inventory BFF's role in the architecture is to act as an orchestrator between the core business services and the specific digital channel it is focused on supporting. This class article will give you more detail about the [Backend For Frontend architectural pattern](https://samnewman.io/patterns/architectural/bff/) and the benefits.
@@ -11,116 +11,93 @@ The Inventory solution will use [GraphQL](https://graphql.org/) for its BFF laye
11
11
12
12
## Setup
13
13
14
-
### [Optional]: Access cloud shell
14
+
### Create your OpenShift project and register the pipeline
15
15
16
-
If you don't plan to use your workstation to run this lab, you can use IBM Cloud Shell:
16
+
- Create a new repository from the [Typescript GraphQL template](https://github.com/IBM/template-graphql-typescript/generate).
17
17
18
-
- Open the IBM Cloud console (cloud.ibm.com) in your browser and log in if needed.
18
+
!!! warning
19
+
If you are developing on a shared education cluster, place the repository in the **Git Organization** listed in your notification email and remember to add your initials as a suffix to the app name.
20
+
- In order to prevent naming collisions, name the repository `inv-bff-{your initials}` replacing `{your initials}` with your actual initials.
19
21
20
-
-Invoke Cloud Shell by clicking on the button at the top, right-hand corner of the browser window.
- In the OpenShift web console, head up to **Topology** menu on the left on the **Developer** perspective and click **Create a new project**.
23
26
24
-
### Setup your shell environment
27
+
- Give a name to your project, call it `dev-{your initials}`, the other fields are optional.
25
28
26
-
We have provided a simplified installer that will install tools and configure the shell environment. The
27
-
installer will first check if the required tool is available in the path. If not, the missing tool(s) will be
28
-
installed into the `bin/` folder of the current user's home directory and the `PATH` variable will be updated in the
29
-
`.bashrc` or `.zshrc` file to include that directory.
29
+
- Initialize a web terminal using the `>_` button on the top bar next to your name on the cluster. You should have a terminal with all the necessary development tools.
30
30
31
-
The following tools are included in the shell installer:
31
+
=== "Using your local terminal"
32
+
!!! note
33
+
You should have the `oc` and `igc` command line tools installed. If not, refer to the [developers tools setup page](/getting-started/devenvsetup/#tools-installation-on-desktoplaptop).
34
+
35
+
- In the OpenShift web console, click on email address top right, click on **Copy login command** and get the OpenShift login command, which includes a token.
36
+
37
+
- Click on **Display Token**, copy the Login with the token. oc login command will log you in. Run the login command in the cloud shell terminal:
2. The installer updates PATH in the `.zshrc` or `.bashrc` file. You will need to source the file to apply the update to the current shell environment:
Logged into "https://c103-e.us-south.containers.cloud.ibm.com:30979" as "IAM#email@company" using the token provided.
58
+
- Go to the directory of the repository your cloned and [Register the pipeline](/developer-intermediate/deploy-app#5-register-the-application-in-a-openshift-pipeline)
87
59
88
-
You have access to 71 projects, the list has been suppressed. You can list all projects with 'oc projects'
60
+
```
61
+
oc pipeline --tekton
62
+
```
89
63
90
-
Using project "dev-ab".
91
-
```
64
+
- Give git credentials if prompted, and master as the git branch to use. When prompted for the pipeline, select `ibm-nodejs`
92
65
93
-
### Setup code base
66
+
```bash
67
+
$ oc pipeline --tekton
68
+
...
94
69
95
-
To get the initial BFF project created and registered with a pipeline for automated builds follow these steps.
70
+
Pipeline run started: inv-bff-ns-181f77c24a4
71
+
```
96
72
97
-
- Create a new repository from the [Typescript GraphQL template](https://github.com/IBM/template-graphql-typescript/generate).
73
+
-[Open the pipeline](/developer-intermediate/deploy-app/#5-register-the-application-in-a-openshift-pipeline) to see it running
98
74
99
-
!!! warning
100
-
If you are developing on a shared education cluster, place the repository in the **Git Organization** listed in your notification email and remember to add your initials as a suffix to the app name.
101
-
- In order to prevent naming collisions, name the repository `inventory-management-bff-{your initials}` replacing `{your initials}` with your actual initials.
75
+
- When the pipeline is completed, run `oc endpoints -n dev-{your initials}`. You should see an entry for the app we just pushed. Select the entry and hit `Enter` to launch the browser.
102
76
103
-
- Clone the new repository to your machine.
77
+
### Choose your development environment
104
78
105
-
- Run `npm install` to install all the package dependencies.
79
+
=== "Gitpod"
80
+
- Head over to [gitpod.io](https://gitpod.io), login with your github account by clicking **Continue with GitHub**.
81
+
82
+
- Grant access to gitpod to your GitHub organization by going to account settings on the top right corner, navigate to **Integrations**, go to GitHub and click **Manage on GitHub**.
83
+
84
+
- On GitHub, search the organization you have used to create the repository and click **grant** to allow gitpod to access repositories in that organization.
85
+
86
+
- Back to [gitpod.io](https://gitpod.io/workspaces), navigate to workspaces and click **New Workspace** to create a new workspace, give it your newly create repository URL.
87
+
88
+
- If it is your first gitpod workspace, it will ask you for your preferred editor, pick the in browser Visual Studio Code, and the workspace will be created automatically for your.
89
+
90
+
You are now ready to modify the application!
106
91
107
-
- Go into the repository directory cloned and execute the following:
92
+
=== "Locally"
93
+
Clone the project and open it using your favorite text editor or IDE (Visual Studio Code, Atom...).
- replacing `{your initials}` with your actual initials
118
-
- Give git credentials if prompted, and master as the git branch to use. When prompted for the pipeline, select`igc-nodejs-<VERSION>`.
119
-
120
-
- Open the pipeline to see it running, using the link provided in the command output.
121
-
122
-
- When the pipeline is completed, run `oc endpoints -n dev-{your initials}`. You should see an entry forthe app we just pushed. Select the entry and hit `Enter` to launch the browser, if you are working on your desktop/laptop. Otherwise copy the url and paste itin a new browser tab.
123
-
124
101
## Create the REST interface
125
102
126
103
The controller provides the REST interface for our BFF. The template uses the `typescript-rest`
@@ -655,7 +632,7 @@ The config class separates how the config is loaded from how it is used. In this
Copy file name to clipboardExpand all lines: docs/developer-intermediate/inventory-prebuilt-solution/index.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ In some cases with self pace hands on labs you may not get everything working. C
13
13
### Inventory Service
14
14
15
15
- Create a new project from the [Inventory Management Service solution template](https://github.com/ibm-ecosystem-lab/inventory-management-svc-intermediate/generate)
16
-
named `inv-man-svc-sol-{initials}`
17
-
- Replacing`{initials}` with your actual initials
16
+
named `inv-svc-solution-{initials}`
17
+
- replacing`{initials}` with your actual initials
18
18
19
19
- Clone the repository to your local machine
20
20
@@ -37,8 +37,8 @@ named `inv-man-svc-sol-{initials}`
37
37
### Inventory BFF
38
38
39
39
- Create a new project from the [Inventory Management BFF solution template](https://github.com/ibm-ecosystem-lab/inventory-bff-prebuild/generate)
40
-
named `inventory-management-bff-solution-{initials}`
41
-
- Replacing `{initials}` with your actual initials
40
+
named `inv-bff-solution-{initials}`
41
+
- replacing `{initials}` with your actual initials
42
42
43
43
- Go into the cloned repository directory and execute the following, if you have not executed it previously:
44
44
@@ -56,7 +56,7 @@ named `inventory-management-bff-solution-{initials}`
56
56
57
57
- Open the [pipeline to see it running](/developer-intermediate/deploy-app/#6-view-your-application-pipeline)
58
58
59
-
- Get the backend service name this value by executing the command `oc get svc -n dev-{initials}.
59
+
- Get the backend service name this value by executing the command `oc get svc -n dev-{initials}`.
60
60
```
61
61
$ oc get svc -n dev-ar
62
62
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
@@ -78,8 +78,8 @@ service of the microservice: `connectsTo: inventory-svc-ar`
78
78
### Inventory UI
79
79
80
80
- Create a new project from the [Inventory Management UI solution template](https://github.com/ibm-ecosystem-lab/inventory-ui-prebuild/generate)
81
-
named `inventory-management-ui-solution-{initials}`
82
-
- Replacing `{initials}` with your actual initials
81
+
named `inv-ui-solution-{initials}`
82
+
- replacing `{initials}` with your actual initials
0 commit comments