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: content/learning-paths/cross-platform/create-your-own-topo-project/_index.md
+29-26Lines changed: 29 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
1
---
2
-
title: Create and deploy a custom Topo Template
2
+
title: Create and deploy a custom Topo Project
3
3
4
-
description: Understand how to create and modify Topo Templates, allowing you to deploy your projects as containerized workloads to Arm-based Linux targets over SSH.
description: Understand how to create and modify Topo Projects, allowing you to deploy your projects as containerized workloads to Arm-based Linux targets over SSH.
5
8
6
9
minutes_to_complete: 30
7
10
8
-
who_is_this_for: This is an introductory topic for embedded, edge, and cloud software developers who want to create their own Topo Templates projects to be natively deployed with Topo.
11
+
who_is_this_for: This is an introductory topic for embedded, edge, and cloud software developers who want to create their own Topo Projects to be natively deployed with Topo.
9
12
10
13
learning_objectives:
11
-
- Explain the purpose and structure of a Topo Template
12
-
- Clone and deploy an existing Topo Template and modify it by adding new clone-time arguments
13
-
- Create a new Topo Template from a Docker Compose project
14
-
- Add x-topo metadata for configurable arguments, deployment guidance, and hardware requirements
15
-
- Locate and install Agent Skills to assist with creating and reviewing Topo Templates
14
+
- Explain the purpose and structure of a Topo Project
15
+
- Clone and deploy an existing Topo Project and modify it by adding new clone-time parameters
16
+
- Create a new Topo Project from a Docker Compose project
17
+
- Add x-topo metadata for configurable parameters, deployment guidance, and hardware requirements
18
+
- Locate and install Agent Skills to assist with creating and reviewing Topo Projects
16
19
17
20
prerequisites:
18
21
- Completion of the [Deploy containerized workloads to Arm-based Linux targets with Topo](/learning-paths/cross-platform/deploy-containerized-workloads-with-topo/) Learning Path.
description: Install and use Topo Project Agent Skills to help create, review, and refine Topo Projects.
4
+
weight: 6
5
+
6
+
### FIXED, DO NOT MODIFY
7
+
layout: learningpathall
8
+
---
9
+
10
+
## Skills for authoring Topo Projects
11
+
12
+
If you already have a Docker Compose project and want to convert it to a Topo Project, you can do so with an Agent Skill. You can also use a skill to create your own Topo Project from scratch. These skills are optional authoring aids.
13
+
14
+
[Topo](https://github.com/arm/topo) currently provides the following skills:
15
+
16
+
-`topo-project-context`: provides Topo and Topo Project reference context for questions about x-topo metadata, schema, docs, and CLI project behavior.
17
+
-`topo-project-bootstrap`: converts a repository into a Topo Project by adding or improving `compose.yaml` and `x-topo` metadata.
18
+
-`topo-project-lint`: reviews an existing Topo Project for correctness, consistency, and authoring best practices.
19
+
-`topo-project-optimize-deployment`: optimizes feedback loop by measuring and applying the highest-leverage Docker build improvement.
20
+
21
+
For the most up-to-date list of the available Topo skills, see [Topo Skills](https://github.com/arm/topo/tree/main/skills).
22
+
23
+
## Install the skills
24
+
25
+
Install the Topo skills with [npx skills](https://github.com/vercel-labs/skills):
26
+
27
+
{{% notice Note %}}
28
+
`npx` requires Node.js. If you don't have Node.js installed on your machine, install it before running the following command.
29
+
{{% /notice %}}
30
+
31
+
```bash
32
+
npx skills add arm/topo
33
+
```
34
+
35
+
Restart your AI coding agent after installing or updating skills to make sure new skills are loaded for use.
36
+
37
+
## Use the skills
38
+
39
+
After installing skills, you can prompt your agent to use a skill.
40
+
41
+
For example, to create a Topo Project from an existing project:
42
+
43
+
```text
44
+
Use the topo-project-bootstrap skill to convert this repository into a Topo Project.
45
+
```
46
+
47
+
## What you've accomplished
48
+
49
+
You've now learned how you can install and use Agent Skills to help author Topo Projects.
50
+
51
+
You can now create, modify, and deploy Topo Projects to Arm-based Linux targets. To find more projects to clone and modify, explore the [Topo Catalog](https://github.com/arm/topo-project-catalog/blob/main/data/catalog.json).
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/create-your-own-topo-project/creating-a-new-project.md
+37-40Lines changed: 37 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Create a new Topo Template from an empty directory
3
-
description: Create a Topo Template from a Docker Compose project with x-topo metadata, clone-time arguments, and an Arm Linux container image.
2
+
title: Create a new Topo Project from an empty directory
3
+
description: Create a Topo Project from a Docker Compose project with x-topo metadata, clone-time parameters, and an Arm Linux container image.
4
4
weight: 5
5
5
6
6
### FIXED, DO NOT MODIFY
@@ -9,9 +9,9 @@ layout: learningpathall
9
9
10
10
## Create a web page with configurable text and color
11
11
12
-
You've already cloned and modified an existing Topo Template. In this section, you'll create a new template from an empty directory.
12
+
You've already cloned and modified an existing Topo Project. In this section, you'll create a new project from an empty directory.
13
13
14
-
The template serves a small web page with configurable text and color, and demonstrates the core parts of a Topo Template:
14
+
The project serves a small web page with configurable text and color, and demonstrates the core parts of a Topo Project:
15
15
16
16
- A `compose.yaml` file with standard Compose services
17
17
- An `x-topo` metadata block
@@ -20,14 +20,14 @@ The template serves a small web page with configurable text and color, and demon
20
20
21
21
### Create the project directory
22
22
23
-
Create a new directory for the template:
23
+
Create a new directory for the project:
24
24
25
25
```bash
26
26
mkdir -p ~/topo-message-card
27
27
cd~/topo-message-card
28
28
```
29
29
30
-
A Topo Template is a normal project directory. At minimum, it needs to contain a `compose.yaml` file. Most Topo Templates also include a `Dockerfile` and application source code.
30
+
A Topo Project is a normal project directory. At minimum, it needs to contain a `compose.yaml` file. Most Topo Projects also include a `Dockerfile` and application source code.
31
31
32
32
By the end of this section, the directory you created will have the following structure:
ARG CARD_MESSAGE="This page was created from a Topo Template."
111
+
ARG CARD_MESSAGE="This page was created from a Topo Project."
112
112
ARG ACCENT_COLOR="#0091bd"
113
113
114
114
RUN sed -i "s|__CARD_TITLE__|${CARD_TITLE}|g" /usr/share/nginx/html/index.html
115
115
RUN sed -i "s|__CARD_MESSAGE__|${CARD_MESSAGE}|g" /usr/share/nginx/html/index.html
116
116
RUN sed -i "s|__ACCENT_COLOR__|${ACCENT_COLOR}|g" /usr/share/nginx/html/index.html
117
117
```
118
118
119
-
Topo passes configuration values to Topo Templates through Docker build arguments. The `ARG` lines define the values consumed during the image build.
119
+
Topo passes configuration values to Topo Projects through Docker build arguments. The `ARG` lines define the values consumed during the image build.
120
120
121
121
`sed` is a command-line text replacement tool. The `sed` commands replace placeholder text in `index.html` during the image build. This way, each cloned project can customize the web page without manually editing the source file.
122
122
@@ -125,36 +125,35 @@ Topo passes configuration values to Topo Templates through Docker build argument
125
125
Create `compose.yaml` in the `topo-message-card` directory with the following content:
CARD_MESSAGE: "This page was created from a Topo Template."
136
+
CARD_MESSAGE: "This page was created from a Topo Project."
137
137
ACCENT_COLOR: "#0091bd"
138
138
ports:
139
139
- "8088:80"
140
140
141
141
x-topo:
142
142
name: "Message Card"
143
143
description: |
144
-
A minimal web application template that shows a configurable title,
144
+
A minimal web application project that shows a configurable title,
145
145
message, and accent color.
146
-
type: "application"
147
-
deploy_success_message: |
146
+
deployment_success_message: |
148
147
Message Card is running on port 8088.
149
-
args:
148
+
parameters:
150
149
CARD_TITLE:
151
150
description: "The title to show on the message card"
152
151
required: true
153
152
example: "Hello from Arm"
154
153
CARD_MESSAGE:
155
154
description: "The message to show below the title"
156
155
required: false
157
-
default: "This page was created from a Topo Template."
156
+
default: "This page was created from a Topo Project."
158
157
example: "Built once and deployed with Topo"
159
158
ACCENT_COLOR:
160
159
description: "The CSS color used for the card accent"
@@ -163,40 +162,39 @@ x-topo:
163
162
example: "#00a3a3"
164
163
```
165
164
166
-
This file is both a Compose file and a Topo Template definition.
165
+
This file is both a Compose file and a Topo Project definition.
167
166
168
167
The `services` section is standard Compose. The service builds the local `Dockerfile`, publishes the web server on port `8088`, and sets `platform: linux/arm64` so the service targets Arm-based Linux systems.
169
168
170
169
The `x-topo` section is the Topo metadata block:
171
170
172
-
- `name`gives the template a human-readable name.
173
-
- `description`explains what the template does.
174
-
- `type`identifies this as an application template.
175
-
- `deploy_success_message`prints a useful hint after deployment.
176
-
- `args`defines the values Topo prompts for when someone clones the template.
171
+
- `name`gives the project a human-readable name.
172
+
- `description`explains what the project does.
173
+
- `deployment_success_message`prints a useful hint after deployment.
174
+
- `parameters`defines the values Topo prompts for when someone clones the project.
177
175
178
-
The argument names in `x-topo.args` match the keys under `services.message-card.build.args`. When Topo resolves the arguments, it writes the selected values into the build arguments.
176
+
The argument names in `x-topo.parameters` match the keys under `services.message-card.build.args`. When Topo resolves the parameters, it writes the selected values into the build arguments.
179
177
180
-
The same argument name appears in three places: `x-topo.args`defines what Topo asks for, `build.args` passes the value to Docker, and the Dockerfile `ARG` consumes it.
178
+
The same name appears in three places: `x-topo.parameters`defines what Topo asks for, `build.args` passes the value to Docker, and the Dockerfile `ARG` consumes it.
181
179
182
-
### Clone the local Topo Template
180
+
### Clone the local Topo Project
183
181
184
-
Clone your local Topo Template into a new project directory.
182
+
Clone your local Topo Project into a new project directory.
185
183
186
-
You can choose to answer interactive prompts for the arguments:
184
+
You can choose to answer interactive prompts for the project parameters:
Then open `http://localhost:8088/` in your browser.
241
239
242
-

240
+

243
241
244
242
Confirm that the container is running:
245
243
@@ -251,38 +249,37 @@ The output includes the `message-card` service and port `8088`.
251
249
252
250
## (Optional) Add hardware requirements
253
251
254
-
Add `features` only when your Topo Template needs specific Arm hardware features. For example, a SIMD benchmark that requires SVE can declare that it needs SVE:
252
+
Add `features` only when your Topo Project needs specific Arm hardware features. For example, a SIMD benchmark that requires SVE can declare that it needs SVE:
255
253
256
254
```yaml
257
255
x-topo:
258
256
name: "SIMD Visual Benchmark"
259
257
description: |
260
258
Visual demonstration of SIMD performance benefits on Arm processors.
261
-
type: "application"
262
259
features:
263
260
- "SVE"
264
261
```
265
262
266
-
Topo can use these feature requirements when listing templates against a target.
263
+
Topo can use these feature requirements when listing projects against a target.
267
264
268
-
## Share the Topo Template
265
+
## Share the Topo Project
269
266
270
-
To share your Topo Template, publish the template directory as a Git repository. Other users can then clone it with Topo:
267
+
To share your Topo Project, publish the project directory as a Git repository. Other users can then clone it with Topo:
If you want the template to be reused by the wider Topo community, include:
273
+
If you want the project to be reused by the wider Topo community, include:
277
274
278
275
- `compose.yaml`
279
276
- Any Dockerfiles and source files required by the services
280
277
- A `README.md` with usage instructions
281
278
- A license file
282
-
- Clear `x-topo` metadata and argument descriptions
279
+
- Clear `x-topo` metadata and parameter descriptions
283
280
284
281
## What you've accomplished and what's next
285
282
286
-
You've now created a complete Topo Template from scratch. You created the web page HTML, added a Compose file, described the template with `x-topo` metadata, supplied clone-time arguments, and deployed the generated project to an Arm-based Linux target.
283
+
You've now created a complete Topo Project from scratch. You created the web page HTML, added a Compose file, described the project with `x-topo` metadata, supplied clone-time parameters, and deployed the generated project to an Arm-based Linux target.
287
284
288
-
Next, you'll learn where to find Agent Skills that can help you create, modify, and review Topo Templates.
285
+
Next, you'll learn where to find Agent Skills that can help you create, modify, and review Topo Projects.
0 commit comments