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
{{ message }}
This repository was archived by the owner on May 30, 2024. It is now read-only.
- An IAM API key will be created, copy and/or download the key and secure it safely.
41
-
**NOTE:** This IAM API key is required later for Liquid Prep project deployment and IBM Cloud CLI login. Please copy/download and store it in a secure place. If the IAM API key is **NOT** copied/downloaded and stored in secure place, you will have to create new IAM API key.
42
-
43
-
-**Create Resource Group**;
44
-
45
-
- Click on **Manage** tab on top right of the IBM Cloud dashboard. And click on **Account** option to open **Account** dashboard.
46
-
- Select **Resource groups** option on the left panel of the dashboard. Usually a **Default** resource group will be created when a cloud account is created. If not a new Resource group can be created by clicking on the **Create** button on the right of the **Resource groups** dashboard.
4. Create new Actions by clicking the **Create** on top right of the dashboard, enter Action Name as **liquid-prep-action**. Create new Package **liquidPrep**. Select **Node.js 12** as Runtime.
6. Select **Create API** option on top right of the dashboard, enter API name as **liquidPrep-cf-api**. Let the **Base path for API** be default **/liquidPrep-cf-api**. Let other settings be default values, unless other specific entries are required. Scroll down the page and select **Create**.
7. Once API is created, select the API **liquidPrep-cf-api**, select **Manage Sharing and Keys** on the left pane of the API dashboard. Enable **Include API in organization-level Shared APIs view**.
1. Select **Create** on the bottom right pane of Cloudant dashboard. After you click **Create**, a message displays to say that the instance is being provisioned, which returns you to the Resource list. From the Resource list, you see the status for your instance is, **Provision in progress.**
1. When status of the instance changes to **Active**, click the **Cloudant-liquidPrep** instance and select **Service Credentials** tab on left pane of dashboard.
132
-
1. Select **New Credential**, enter Name as **liquid-prep** and Role as **Manager**. A service credential will be created.
1. Select **Manage** tab on the left pane and select **Launch Dashboard** on the top right of the page. It will launch a Cloudant dashboard to create new database.
137
-
1. On the Databases page, select **Create Database** on the top right of the Cloudant dashboard.
138
-
1. Enter Database name as **liquid-prep-crops**. Select the Partitioning option as **Non-partitioned**. And click on **Create** button at the bottom.
1. Go to Liquid Prep project directory `~/Liquid-Prep/backend/resources/crops`. Open each crop document, copy the contents in the document and paste it in the **New Document** that was opened in **liquid-prep-crops** database and click **Create Document** button. <br>
1. Similarly, repeat step 13 for all the other crops document.
157
-
158
-
## Deploy Liquid Prep Backend Service
159
-
160
-
After configuring IBM Cloud Functions and Cloudant DB, the Liquid Prep backend project needs to built, bundled and deployed to IBM Cloud Functions to expose Cloud Functions API for Liquid Prep application. <br>
161
-
162
-
1. Go to Liquid Prep project directory `~/Liquid-Prep/backend/liquid-prep-cf` and create **.env** file.
where the entries should be filled out as follows:
174
-
175
-
**IAM_API_KEY:** <br>
176
-
It is the API key created at the beginning when an IBM Cloud account is created. Please refer to the **Pre-requisites** section on how to create/obtain the IAM API key.
177
-
178
-
**CLOUD_FUNCTIONS_URL:** <br>
179
-
- Go to IBM Cloud dashboard.
180
-
- Click on the **Navigation Menu** on the top left corner of the dashboard.
It is the **API key** created at the beginning when an IBM Cloud account is created. Please refer to the **Pre-requisites --> IBM Cloud account --> Create IAM API key** section on how to create/obtain the IAM API key.
219
-
220
-
-**-g**: <br>
221
-
It is the **Resource group** of the cloud account. Usually a **Default** resource group will be created. If not you can create a new resource group and enter. <br>
222
-
Please refer to the **Pre-requisites --> IBM Cloud account --> Create Resource Group** section on how to create/obtain the Resource group.
223
-
224
-
-**-o**: <br>
225
-
It is the **Cloud Foundry Organization** of the cloud account. Please refer to the **Pre-requisites --> IBM Cloud account --> Create Cloud Foundry Organization** section on how to create/obtain the Cloud Foundry Organization.
226
-
227
-
-**-s**: <br>
228
-
It is the **Space** in the **Cloud Foundry Organization** of the cloud account. Please refer to the **Pre-requisites --> IBM Cloud account --> Create Space** section on how to create/obtain the Space.
229
-
230
-
-**-r**: <br>
231
-
It is the **Region** of the cloud account. Region can be obtained in the selected **Cloud Foundry Organization** dashboard beside the **Space** Name.
3. Navigate to project directory `~/Liquid-Prep/backend/liquid-prep-cf` from command terminal and execute `npm run deploy-dev-api`.
21
+
Once the backend service is deployed, you can test the APIs if they are working as expected. You can test the APIs by simply calling them in any browser (Chrome, Firefox, Edge) or using CURL command or API clients like [Postman](https://www.postman.com/).
237
22
238
-
Once the deployment is successful, go to IBM Cloud Functions dashboard, select **Actions** tab on the left pane and you can see **liquid-prep-action** instance in the **Actions** dashboard.
23
+
You will have to first capture the **API Host URL** from the API Management Dashboard in IBM Cloud.
-**id**: Id is the unique identity number assigned for the crop and can be obtained from list of supported crops in https://github.com/Liquid-Prep/Liquid-Prep/tree/master/backend/resources/crops <br>
66
+
-**id**: It is the unique identity number assigned for the crop and can be obtained from list of supported crops by executing the **GET-CROP-LIST** API <br>
0 commit comments