-
Notifications
You must be signed in to change notification settings - Fork 11
Snap build configuration #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ted-gould
wants to merge
14
commits into
axiomhq:main
Choose a base branch
from
ted-gould:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9f9057a
Bootstrap Axiom build
ted-gould 0ef97e7
Drop the cli docs tool
ted-gould aa8f790
Add a journald ingester service
ted-gould 249b7d4
Add in bash completion
ted-gould 1513d65
Reconfigure to build a TOML file
ted-gould 27cb24b
Readme for snap
ted-gould 5dc0f7e
Specify timestamp field
ted-gould 86a5408
Make the README a little clearer.
ted-gould a42bf33
Merge remote-tracking branch 'upstream/main' into main
ted-gould be6f29e
Switch build step to use 'make install'
ted-gould 942b305
Get the version information from the axiom binary
ted-gould 222988a
Too aggressive, 1.18 isn't on stable yet
ted-gould 51a7b86
Typos in instructions
ted-gould 9dcb87b
Dropping some linker options to see if they clean up our builds
ted-gould File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,21 @@ | ||
| #!/bin/sh -e | ||
|
|
||
| journald_token="$(snapctl get journald-token)" | ||
| journald_url="$(snapctl get journald-url)" | ||
| journald_dataset="$(snapctl get journald-dataset)" | ||
|
|
||
| cat <<EOL > ${SNAP_DATA}/journald-config | ||
| active_deployment = "journald-backend" | ||
|
|
||
| [deployments] | ||
| [deployments.journald-backend] | ||
| url = "${journald_url}" | ||
| token = "${journald_token}" | ||
| EOL | ||
|
|
||
| cat <<EOL > ${SNAP_DATA}/journald-env | ||
| AXIOM_DATASET="${journald_dataset}" | ||
| AXIOM_DEPLOYMENT=journald-backend | ||
| EOL | ||
|
|
||
| snapctl restart axiom.journald-ingester |
This file contains hidden or 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,23 @@ | ||
| #!/bin/sh -e | ||
|
|
||
| ENVFILE="${SNAP_DATA}/journald-env" | ||
| CONFFILE="${SNAP_DATA}/journald-config" | ||
|
|
||
| if [ ! -f "${CONFFILE}" ] ; then | ||
| echo "Journald configuration not available" | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ ! -f "${ENVFILE}" ] ; then | ||
| echo "Journald environment not available" | ||
| exit 0 | ||
| fi | ||
|
|
||
| . ${ENVFILE} | ||
|
|
||
| if [ -z ${AXIOM_DATASET} ]; then | ||
| echo "Configuration not complete: ${ENVFILE}" | ||
| exit 0 | ||
| fi | ||
|
|
||
| exec journalctl --output=json --no-page --follow | ${SNAP}/bin/axiom ingest -C ${CONFFILE} --timestamp-field=__REALTIME_TIMESTAMP ${AXIOM_DATASET} |
This file contains hidden or 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,40 @@ | ||
| name: axiom | ||
| base: core20 | ||
| adopt-info: axiom-cli | ||
| summary: The power of Axiom on the command line. | ||
| description: | | ||
| Axiom is a Next-Generation Data Platform | ||
| . | ||
| Axiom's coordination-free ingest, object-store based storage, and serverless querying mean that your organization's log management can be supercharged in the most efficient and affordable way. | ||
|
|
||
| grade: stable | ||
| confinement: strict | ||
| compression: lzo | ||
|
|
||
| parts: | ||
| axiom-cli: | ||
| plugin: go | ||
| go-channel: 1.17/stable | ||
| source: . | ||
| prime: | ||
| - -bin/gen-cli-docs | ||
| override-build: | | ||
| GOPATH=$SNAPCRAFT_PART_INSTALL/bin make install | ||
| snapcraftctl set-version `$SNAPCRAFT_PART_INSTALL/bin/axiom --version | cut -d " " -f 4` | ||
| override-prime: | | ||
| snapcraftctl prime | ||
| mkdir -p $SNAPCRAFT_PRIME/share/ | ||
| $SNAPCRAFT_PRIME/bin/axiom completion bash > $SNAPCRAFT_PRIME/share/bash_completion | ||
| snap-helpers: | ||
| plugin: dump | ||
| source: snap/local | ||
|
|
||
| apps: | ||
| axiom: | ||
| plugs: [ "network" ] | ||
| command: bin/axiom | ||
| completer: share/bash_completion | ||
| journald-ingester: | ||
| plugs: [ "network", "log-observe" ] | ||
| command: bin/journald-ingester | ||
| daemon: simple |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.