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
This article shows you how to use [Application Accelerator for VMware Tanzu](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.3/tap/GUID-application-accelerator-about-application-accelerator.html) with the Azure Spring Apps Enterprise plan to bootstrap developing your applications in a discoverable and repeatable way.
19
+
This article shows you how to use [Application Accelerator for VMware Tanzu](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-about-application-accelerator.html) (App Accelerator) with the Azure Spring Apps Enterprise plan to bootstrap developing your applications in a discoverable and repeatable way.
20
20
21
-
Application Accelerator for VMware Tanzu helps you bootstrap developing your applications and deploying them in a discoverable and repeatable way. You can use Application Accelerator to create new projects based on published accelerator projects. For more information, see [Application Accelerator for VMware Tanzu](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.3/tap/GUID-application-accelerator-about-application-accelerator.html) in the VMware documentation.
21
+
App Accelerator helps you bootstrap developing your applications and deploying them in a discoverable and repeatable way. You can use App Accelerator to create new projects based on published accelerator projects. For more information, see [Application Accelerator for VMware Tanzu](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-about-application-accelerator.html) in the VMware documentation.
22
22
23
23
## Prerequisites
24
24
@@ -197,11 +197,11 @@ az spring application-accelerator predefined-accelerator enable \
197
197
198
198
In addition to using the predefined accelerators, you can create your own accelerators. You can use any Git repository in Azure Devops, GitHub, GitLab, or BitBucket.
199
199
200
-
Use to following steps to create and maintain your own accelerators:
200
+
Use the following steps to create and maintain your own accelerators:
201
201
202
202
First, create a file named *accelerator.yaml* in the root directory of your Git repository.
203
203
204
-
You can use the *accelerator.yaml* file to declare input options that users fill in using a form in the UI. These option values control processing by the template engine before it returns the zipped output files. If you don't include an *accelerator.yaml* file, the repository still works as an accelerator, but the files are passed unmodified to users. For more information, see [Creating an accelerator.yaml file](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.3/tap/GUID-application-accelerator-creating-accelerators-accelerator-yaml.html).
204
+
You can use the *accelerator.yaml* file to declare input options that users fill in using a form in the UI. These option values control processing by the template engine before it returns the zipped output files. If you don't include an *accelerator.yaml* file, the repository still works as an accelerator, but the files are passed unmodified to users. For more information, see [Creating an accelerator.yaml file](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-creating-accelerators-accelerator-yaml.html).
205
205
206
206
Next, publish the new accelerator.
207
207
@@ -215,7 +215,7 @@ To create your own accelerator, open the **Accelerators** section and then selec
215
215
216
216
#### [Azure CLI](#tab/Azure-CLI)
217
217
218
-
Use the following command to create your own accelerator in Azure CLI.
218
+
Use the following command to create your own accelerator in Azure CLI:
219
219
220
220
```azurecli
221
221
az spring application-accelerator customized-accelerator create \
@@ -254,13 +254,15 @@ The following table describes the customizable accelerator fields.
254
254
|**Git branch**|`git-branch`| The Git branch to check out and monitor for changes. You should specify only the Git branch, Git commit, or Git tag. | Optional |
255
255
|**Git commit**|`git-commit`| The Git commit SHA to check out. You should specify only the Git branch, Git commit, or Git tag. | Optional |
256
256
|**Git tag**|`git-tag`| The Git commit tag to check out. You should specify only the Git branch, Git commit, or Git tag. | Optional |
257
+
|**Git sub path**|`git-sub-path`| The folder path inside the Git repository to consider as the root of the accelerator or fragment. | Optional |
257
258
|**Authentication type**|`N/A`| The authentication type of the accelerator source repository. The type can be `Public`, `Basic auth`, or `SSH`. | Required |
258
259
|**User name**|`username`| The user name to access the accelerator source repository whose authentication type is `Basic auth`. | Required when the authentication type is `Basic auth`. |
259
260
|**Password/Personal access token**|`password`| The password to access the accelerator source repository whose authentication type is `Basic auth`. | Required when the authentication type is `Basic auth`. |
260
261
|**Private key**|`private-key`| The private key to access the accelerator source repository whose authentication type is `SSH`. Only OpenSSH private key is supported. | Required when authentication type is `SSH`. |
261
262
|**Host key**|`host-key`| The host key to access the accelerator source repository whose authentication type is `SSH`. | Required when the authentication type is `SSH`. |
262
263
|**Host key algorithm**|`host-key-algorithm`| The host key algorithm to access the accelerator source repository whose authentication type is `SSH`. Can be `ecdsa-sha2-nistp256` or `ssh-rsa`. | Required when authentication type is `SSH`. |
263
264
|**CA certificate name**|`ca-cert-name`| The CA certificate name to access the accelerator source repository with self-signed certificate whose authentication type is `Public` or `Basic auth`. | Required when a self-signed cert is used for the Git repo URL. |
265
+
|**Type**|`type`| The type of customized accelerator. The type can be `Accelerator` or `Fragment`. The default value is `Accelerator`. | Optional |
264
266
265
267
To view all published accelerators, see the App Accelerators section of the **Developer Tools** page. Select the App Accelerator URL to view the published accelerators in Dev Tools Portal:
266
268
@@ -273,6 +275,82 @@ To view the newly published accelerator, refresh Dev Tools Portal.
273
275
> [!NOTE]
274
276
> It might take a few seconds for Dev Tools Portal to refresh the catalog and add an entry for your new accelerator. The refresh interval is configured as `git-interval` when you create the accelerator. After you change the accelerator, it will also take time to be reflected in Dev Tools Portal. The best practice is to change the `git-interval` to speed up for verification after you apply changes to the Git repo.
275
277
278
+
### Reference a fragment in your own accelerators
279
+
280
+
Writing and maintaining accelerators can become repetitive and verbose as new accelerators are added. Some people create new projects by copying existing ones and making modifications, but this process can be tedious and error prone. To make the creation and maintenance of accelerators easier, Application Accelerator supports a feature named Composition that allows the reuse of parts of an accelerator, called *fragments*.
281
+
282
+
Use following steps to reference a fragment in your accelerator:
283
+
284
+
1. Publish the new accelerator of type `Fragment` using the Azure portal or the Azure CLI.
285
+
286
+
#### [Azure portal](#tab/Portal)
287
+
288
+
To create a fragment accelerator, open the **Accelerators** section, select **Add Accelerator** under the **Customized Accelerators** section, and then select **Fragment**.
289
+
290
+
:::image type="content" source="media/how-to-use-accelerator/add-fragment.png" alt-text="Screenshot of the Azure portal that shows the Customized Accelerators of type `Fragment`." lightbox="media/how-to-use-accelerator/add-fragment.png":::
291
+
292
+
#### [Azure CLI](#tab/Azure-CLI)
293
+
294
+
Use the following command to create a customized accelerator of type `Fragment`:
295
+
296
+
```azurecli
297
+
az spring application-accelerator customized-accelerator create \
298
+
--resource-group <resource-group-name> \
299
+
--service <service-instance-name> \
300
+
--name <fragment-accelerator-name> \
301
+
--display-name <display-name> \
302
+
--type Fragment \
303
+
[--git-sub-path <sub project path>] \
304
+
--git-url <git-repo-URL>
305
+
```
306
+
307
+
1. Change the *accelerator.yaml* file in your accelerator project. Use the `imports` instruction in the `accelerator` section and the `InvokeFragment` instruction in the `engine` section to reference the fragment in the accelerator, as shown in the following example:
308
+
309
+
```yaml
310
+
accelerator:
311
+
...
312
+
# options for the UI
313
+
options:
314
+
...
315
+
imports:
316
+
- name: <fragment-accelerator-name>
317
+
...
318
+
319
+
engine:
320
+
chain:
321
+
...
322
+
- merge:
323
+
- include: [ "**" ]
324
+
- type: InvokeFragment
325
+
reference: <fragment-accelerator-name>
326
+
```
327
+
328
+
1. Synchronize the change with the Dev Tools Portal.
329
+
330
+
To reflect the changes on the Dev Tools Portal more quickly, you can provide a value for the **Git interval** field of your customized accelerator. The **Git interval** value indicates how frequently the system checks for updates in the Git repository.
331
+
332
+
1. Synchronize the change with your customized accelerator on the Azure portal by using the Azure portal or the Azure CLI.
333
+
334
+
#### [Azure portal](#tab/Portal)
335
+
336
+
The following list shows the two ways you can sync changes:
337
+
338
+
- Create or update your customized accelerator.
339
+
- Open the **Accelerators** section, and then select **Sync certificate**.
340
+
341
+
#### [Azure CLI](#tab/Azure-CLI)
342
+
343
+
Use the following command to sync changes for an accelerator:
344
+
345
+
```azurecli
346
+
az spring application-accelerator customized-accelerator sync-cert \
347
+
--name <customized-accelerator-name> \
348
+
--service <service-instance-name> \
349
+
--resource-group <resource-group-name>
350
+
```
351
+
352
+
For more information, see [Use fragments in Application Accelerator](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-creating-accelerators-composition.html) in the VMware documentation.
353
+
276
354
### Use accelerators to bootstrap a new project
277
355
278
356
Use the following steps to bootstrap a new project using accelerators:
@@ -301,7 +379,7 @@ Use the following steps to bootstrap a new project using accelerators:
301
379
302
380
### Configure accelerators with a self-signed certificate
303
381
304
-
When you set up a private Git repository and enable HTTPS with a self-signed certificate, you should configure the CA certificate name to the accelerator for client cert verification from the accelerator to the Git repository.
382
+
When you set up a private Git repository and enable HTTPS with a self-signed certificate, you should configure the CA certificate name to the accelerator for client certificate verification from the accelerator to the Git repository.
305
383
306
384
Use the following steps to configure accelerators with a self-signed certificate:
307
385
@@ -337,7 +415,7 @@ As certificates expire, you need to rotate certificates in Spring Cloud Apps by
337
415
1. Import the certificates into Azure Spring Apps. For more information, see the [Import a certificate](how-to-use-tls-certificate.md#import-a-certificate) section of [Use TLS/SSL certificates in your application in Azure Spring Apps](how-to-use-tls-certificate.md).
338
416
1. Synchronize the certificates using the Azure portal or the Azure CLI.
339
417
340
-
The accelerators will not automatically use the latest certificate. You should sync one or all certificates by using the Azure portal or the Azure CLI.
418
+
The accelerators won't automatically use the latest certificate. You should sync one or all certificates by using the Azure portal or the Azure CLI.
341
419
342
420
#### [Azure portal](#tab/Portal)
343
421
@@ -368,7 +446,7 @@ You can enable App Accelerator under an existing Azure Spring Apps Enterprise pl
368
446
369
447
### [Azure portal](#tab/Portal)
370
448
371
-
If a Dev tools public endpoint has already been exposed, you can enable App Accelerator, and then use <kbd>Ctrl</kbd>+<kbd>F5</kdb> to deactivate the browser cache to view it on the Dev Tools Portal.
449
+
If a Dev tools public endpoint has already been exposed, you can enable App Accelerator, and then press <kbd>Ctrl</kbd>+<kbd>F5</kbd> to deactivate the browser cache to view it on the Dev Tools Portal.
372
450
373
451
Use the following steps to enable App Accelerator under an existing Azure Spring Apps Enterprise plan instance using the Azure portal:
0 commit comments