-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Building and packaging the application | ||
|
||
The local [`run.sh`][run-sh] script has convenience functions to build, compress and package the application. For example, to build a development package one can simply run: | ||
|
||
```bash | ||
./run.sh package | ||
``` | ||
|
||
This function will build, compress and package the application in a deb package in your `./build` directory. You can then copy this file over to an SR Linux container or hardware system and try it out. | ||
|
||
/// admonition | Packaging with nFPM | ||
The packaging step is explained in detail in [Packaging the NDK app section](../../agent-install-and-ops.md#packaging-the-ndk-application). | ||
/// | ||
|
||
While using the `run.sh` script is fine for a quick local development, you would rather have a build pipeline that can use something like [Goreleaser][goreleaser] and build, package and push the application in a single step. | ||
|
||
The greeter app repo uses [Goreleaser][goreleaser] to build, package and push the application to a free package repository. Checkout the GitHub actions workflow defined in the [`cicd.yml`][cicd-wf] file for more details as well as the [`goreleaser.yml`][goreleaser-yml] file for the Goreleaser configuration. | ||
|
||
## Try greeter | ||
|
||
Once the application package is published in our package repository, containerlab users can install it on their SR Linux system: | ||
|
||
```srl | ||
--{ running }--[ ]-- | ||
A:srl# bash sudo apt update && sudo apt install -y ndk-greeter-go | ||
``` | ||
|
||
Once the package is installed, reload your app manager and try configuring the greeter app: | ||
|
||
```srl | ||
--{ running }--[ ]-- | ||
A:srl# /tools system app-management application app_mgr reload | ||
``` | ||
|
||
[goreleaser]: https://goreleaser.com/ | ||
[run-sh]: https://github.com/srl-labs/ndk-greeter-go/blob/use-bond-agent/run.sh | ||
[goreleaser-yml]: https://github.com/srl-labs/ndk-greeter-go/blob/use-bond-agent/goreleaser.yml | ||
[cicd-wf]: https://github.com/srl-labs/ndk-greeter-go/blob/use-bond-agent/.github/workflows/cicd.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters