Skip to content

Commit 5cdb207

Browse files
committed
HANA Cloud CAP Create Project update Screenshot
1 parent 5938f45 commit 5cdb207

2 files changed

Lines changed: 39 additions & 42 deletions

File tree

73.9 KB
Loading

tutorials/hana-cloud-cap-create-project/hana-cloud-cap-create-project.md

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ primary_tag: products>sap-hana-cloud
99
---
1010

1111
## Prerequisites
12+
1213
- This tutorial is designed for [SAP HANA Cloud](https://community.sap.com/topics/hana). It is not designed for SAP HANA on premise or SAP HANA, express edition.
1314
- You have created a BTP, SAP HANA Cloud instance. [Deploy SAP HANA Cloud](hana-cloud-deploying)
1415
- You have setup SAP Business Application Studio for development: [Set Up SAP Business Application Studio for Development](appstudio-onboarding)
1516

1617
## Details
18+
1719
### You will learn
20+
1821
- How to create an application with the wizard for the [SAP Cloud Application Programming model](https://cap.cloud.sap/docs/)
1922
- How to use the local Git repository for development/testing purposes
2023

@@ -28,40 +31,39 @@ Dev spaces are like isolated virtual machines in the cloud that can be quickly s
2831

2932
In this step we will create a new Dev Space configured for SAP Cloud Application Programming Model (CAP) development. If you already have a dev space configured for CAP and HANA development, you can skip this step as each dev space can hold multiple projects.
3033

31-
3234
1. Go to your SAP Business Technology Platform subaccount and click the **Services -> Instances and Subscriptions** option.
3335

3436
!![Subscriptions](BTP_Subscriptions.png)
3537

36-
3. Locate the **SAP Business Application Studio** entry and click **Go to Application**
38+
1. Locate the **SAP Business Application Studio** entry and click **Go to Application**
3739

3840
!![Go To Application](go_to_application.png)
3941

40-
4. Choose **Create Dev Space**. Please NOTE: In the SAP BTP trial and free tier you are limited to only two Dev Spaces and only one can be active at a time. If you have performed other tutorials, you might already have reached your maximum. In that case you might have to delete one of the other dev spaces in order to continue with this tutorial.
42+
1. Choose **Create Dev Space**. Please NOTE: In the SAP BTP trial and free tier you are limited to only two Dev Spaces and only one can be active at a time. If you have performed other tutorials, you might already have reached your maximum. In that case you might have to delete one of the other dev spaces in order to continue with this tutorial.
4143

4244
!![Create Dev Space](AppStudio Dev Space Manager_.png)
4345

44-
3. Enter any name you wish for your dev space name and choose **Full Stack Cloud Application** as the kind of application you are creating.
46+
1. Enter any name you wish for your dev space name and choose **Full Stack Cloud Application** as the kind of application you are creating.
4547

4648
!![Create Dev Space](create_cap_dev_space.png)
4749

48-
4. The Dev space will automatically be configured with the most common tools you need for the type of application you choose. However you can also choose additional, optional extensions. Since you want to combine CAP and HANA artefacts in the same project, we would ask that you also choose SAP HANA Calculation View Editor and SAP HANA Tools at minimum.
50+
1. The Dev space will automatically be configured with the most common tools you need for the type of application you choose. However you can also choose additional, optional extensions. Since you want to combine CAP and HANA artefacts in the same project, we would ask that you also choose SAP HANA Calculation View Editor and SAP HANA Tools at minimum.
4951

5052
!![Configure Dev Space](configure_cap_dev_space.png)
5153

52-
5. Once all selections are completed, press **Create Dev Space**
54+
1. Once all selections are completed, press **Create Dev Space**
5355

5456
!![Press Create Dev Space](create_dev_space.png)
5557

56-
6. The Dev Space will then begin starting and the process will take a minute or so as your cloud environment is being created
58+
1. The Dev Space will then begin starting and the process will take a minute or so as your cloud environment is being created
5759

5860
!![Staring Dev Space](dev_space_starting.png)
5961

60-
7. Once the Dev Space reaches the green status of **RUNNING**, you can click on the name of the Dev Space and it will load into the editor within your browser
62+
1. Once the Dev Space reaches the green status of **RUNNING**, you can click on the name of the Dev Space and it will load into the editor within your browser
6163

6264
!![Dev Space is Running](dev_space_running.png)
6365

64-
8. You'll be redirected to your newly created SAP Business Application Studio Dev Space. We recommend you bookmark this URL so it's easier for you to access this dev space of your SAP Business Application Studio in the future
66+
1. You'll be redirected to your newly created SAP Business Application Studio Dev Space. We recommend you bookmark this URL so it's easier for you to access this dev space of your SAP Business Application Studio in the future
6567

6668
!![Business Application Studio is running](fully_running.png)
6769

@@ -76,71 +78,69 @@ Before we create our SAP HANA project, we want to do a few more one-time configu
7678

7779
!![CF Not Set](cf_not_set.png)
7880

79-
2. Now in the Cloud Foundry Targets window you can expand either Service or Applications and then click on the Logon icon to continue the configuration process
81+
1. Now in the Cloud Foundry Targets window you can expand either Service or Applications and then click on the Logon icon to continue the configuration process
8082

8183
!![Login Required](cf_login_required.png)
8284

83-
3. The command window will then open at the top of the SAP Business Application Studio. The first input will prompt you for the API endpoint
85+
1. The command window will then open at the top of the SAP Business Application Studio. The first input will prompt you for the API endpoint
8486

8587
!![API Endpoint](api_endpoint.png)
8688

87-
4. The default value proposed is likely the correct value, but if you need to confirm; the value can be found in the SAP BTP cockpit at the Subaccount level
89+
1. The default value proposed is likely the correct value, but if you need to confirm; the value can be found in the SAP BTP cockpit at the Subaccount level
8890

8991
!![Finding the API Endpoint](api_endpoint_from_subaccount.png)
9092

91-
5. Press **Enter** to confirm your input of the API endpoint. The next input field will ask you for the email address you used to create your SAP BTP trial account
93+
1. Press **Enter** to confirm your input of the API endpoint. The next input field will ask you for the email address you used to create your SAP BTP trial account
9294

9395
!![Email](email.png)
9496

95-
6. The next input will ask you for your SAP BTP trial account password
97+
1. The next input will ask you for your SAP BTP trial account password
9698

9799
!![Password](password.png)
98100

99-
7. The next input will ask you for your Organization. In most situations you will have a single choice. But like the API endpoint earlier, if you need to confirm the correct value it will be displayed in the top navigation of the SAP BTP cockpit
101+
1. The next input will ask you for your Organization. In most situations you will have a single choice. But like the API endpoint earlier, if you need to confirm the correct value it will be displayed in the top navigation of the SAP BTP cockpit
100102

101103
!![Organization](organization.png)
102104

103-
8. The final input will ask you for your Space. If you choose the endpoint API and Organization correctly, then you should have a single option of **dev**
105+
1. The final input will ask you for your Space. If you choose the endpoint API and Organization correctly, then you should have a single option of **dev**
104106

105107
!![Space](space.png)
106108

107-
9. Upon completion of all the inputs, you should see that the Organization and Space have been set and you will see any service instances or application instances from the target space.
109+
1. Upon completion of all the inputs, you should see that the Organization and Space have been set and you will see any service instances or application instances from the target space.
108110

109111
!![Org and Space Set Correctly](org_space_set_correctly.png)
110112

111113
[DONE]
112114
[ACCORDION-END]
113115

114-
115116
[ACCORDION-BEGIN [Step 3: ](Create a new project)]
116117

117118
1. Return to the **Explorer** view. From the SAP Business Application Studio Welcome tab, click **Start from template Create a new project**.
118119

119120
!![New project from template](start_from_template.png)
120121

121-
2. Choose **CAP Project** and click Start
122+
1. Choose **CAP Project** and click Start
122123

123124
!![Choose CAP Project](cap_project.png)
124125

125-
3. Use the following name for your project and click **Next**
126+
1. Use the following name for your project and click **Next**
126127

127128
```Name
128129
MyHANAApp
129130
```
130131
131-
> **This name will be used in different steps**. It is recommended that you do not change it unless you remember to replace it in future tasks.
132+
> **This name will be used in different steps**. It is recommended that you do not change it unless you remember to replace it in future tasks.
132133
133134
!![New CAP Project Name](cap_project_name.png)
134135
135-
Choose `Node.js` as the runtime. Select `CI/CD Pipeline Integration`, `Configuration for SAP HANA Deployment`, and `MTA based SAP Cloud Platform Deployment` as the additional features for your project. Press **Finish**
136+
Choose `Node.js` as the runtime. Select `CI/CD Pipeline Integration`, `Configuration for SAP HANA Deployment`, and `MTA based SAP Business Technology Platform Deployment` as the additional features for your project. Press **Finish**
136137
137138
!![New CAP Project Details](cap_project_details.png)
138139
139-
4. The new project should be added to your workspace automatically.
140+
1. The new project should be added to your workspace automatically.
140141
141142
!![Open in New Workspace](new_workspace.png)
142143
143-
144144
[DONE]
145145
[ACCORDION-END]
146146
@@ -150,15 +150,14 @@ Before we create our SAP HANA project, we want to do a few more one-time configu
150150
151151
!![New CAP model project structure](new_project_structure.png)
152152
153-
2. The wizard has also populated the `mta.yaml` configuration file with the necessary dependencies and parameters for each module. Open it in the code editor to explore it.
153+
1. The wizard has also populated the `mta.yaml` configuration file with the necessary dependencies and parameters for each module. Open it in the code editor to explore it.
154154
155155
!![New CAP model project mta.yaml explained](mta_explained.png)
156156
157157
This file is the deployment descriptor and it is the glue that keeps all the micro-services together as a single application throughout its lifecycle. It declares the modules (applications or micro-services) and their dependencies with other micro-services or backing services. You can also use this file to inject variables into the environment variable `VCAP_SERVICES` of your application.
158158
159159
> This file is very sensitive to indentation and does not allow for tabs.
160160
161-
162161
[DONE]
163162
[ACCORDION-END]
164163
@@ -170,17 +169,17 @@ The Cloud Application Programming Model wizard generates a project that supports
170169
171170
!![Adjust db module path](db_path.png)
172171
173-
2. Save these changes
172+
1. Save these changes
174173
175-
3. In the root of the project there is another important configuration file - the package.json. We are going to need to make several changes to this file as well.
174+
1. In the root of the project there is another important configuration file - the package.json. We are going to need to make several changes to this file as well.
176175
177176
!![Open package.json for editing](package_json.png)
178177
179178
> No need to worry about the yellow underlining below the name of the package. This is just a hint and doesn't have any impact on the tutorial.
180179
181-
4. You can completely delete the `devDependencies` section of the `package.json`
180+
1. You can completely delete the `devDependencies` section of the `package.json`
182181
183-
5. The rest of the changes will be in the `cds` section of the file. Replace this entire section of `package.json` with the following content
182+
1. The rest of the changes will be in the `cds` section of the file. Replace this entire section of `package.json` with the following content
184183
185184
```json
186185
"cds": {
@@ -208,7 +207,7 @@ The Cloud Application Programming Model wizard generates a project that supports
208207
209208
> These changes will alter the generated folder structure of the cds build operation. Content will no longer be placed into the gen folder for the db module but back into the source folders. This also will tell CAP to generate hdbtable artifacts instead of hdbcds. This is a critical change for SAP HANA Cloud compatibility. Finally the db.kind change to HANA tells CAP to use HANA at development time instead of SQLite.
210209
211-
6. Save the file
210+
1. Save the file
212211
213212
[DONE]
214213
[ACCORDION-END]
@@ -217,29 +216,29 @@ The Cloud Application Programming Model wizard generates a project that supports
217216
218217
We are using several dependent Node.js modules in our project. They are referenced in the `dependencies` section of the package.json file we were just editing. These dependencies need to be installed into your project before we can do any testing.
219218
220-
1. Open a new terminal
219+
1. Open a new terminal
221220
222221
!![New Terminal](new_terminal.png)
223222
224-
2. The terminal will open in the bottom right of the Business Application studio
223+
1. The terminal will open in the bottom right of the Business Application studio
225224
226225
!![Terminal in BAS](terminal_in_BAS.png)
227226
228-
3. From the terminal run the command `npm install`
227+
1. From the terminal run the command `npm install`
229228
230229
```shell
231230
npm install
232231
```
233232
234233
!![npm install](npm_install.png)
235234
236-
4. For one last change we need to adjust the content generated by the wizard for the **db** folder. The CAP wizard expects that you will use the `cds deploy` command to send content into HANA. However to use the HANA Projects view to deploy to HANA we need some additional files in the **db** folder. Mainly we need a package.json file that will run the `@sap-hdi-deploy` module. Rather than create this file manually, we will use an open source sample utility called hana-cli. From this same terminal window run the command ```npm install -g hana-cli```
235+
1. For one last change we need to adjust the content generated by the wizard for the **db** folder. The CAP wizard expects that you will use the `cds deploy` command to send content into HANA. However to use the HANA Projects view to deploy to HANA we need some additional files in the **db** folder. Mainly we need a package.json file that will run the `@sap-hdi-deploy` module. Rather than create this file manually, we will use an open source sample utility called hana-cli. From this same terminal window run the command ```npm install -g hana-cli```
237236
238237
```shell
239238
npm install -g hana-cli
240239
```
241240
242-
5. After installation run the command ```hana-cli createModule```
241+
1. After installation run the command ```hana-cli createModule```
243242
244243
```shell
245244
hana-cli createModule
@@ -252,17 +251,17 @@ We are using several dependent Node.js modules in our project. They are referenc
252251
253252
You will use the local Git repository for basic version management.
254253
255-
2. Click on the **Source Control** icon
254+
1. Click on the **Source Control** icon
256255
257256
!![Source Control](source_control.png)
258257
259-
3. Click on the **Initialize Repository** icon
258+
1. Click on the **Initialize Repository** icon
260259
261260
!![Initialize Repository](initialize_repository.png)
262261
263-
4. The Source Control panel now shows that it is being managed by Git and changes are being tracked
262+
1. The Source Control panel now shows that it is being managed by Git and changes are being tracked
264263
265-
!![Source Control: GIT](source_control_git.png)
264+
!![Source Control: GIT](source_control_git.png)
266265
267266
[DONE]
268267
[ACCORDION-END]
@@ -285,6 +284,4 @@ Each time you commit to the local or remote repository, you create a version. Th
285284
[DONE]
286285
[ACCORDION-END]
287286
288-
289-
290287
---

0 commit comments

Comments
 (0)