Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Package solana as a snap #377

Merged
merged 3 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ To run a multinode testnet, after starting a leader node, spin up some validator
Generate the validator's configuration file:

```bash
$ cargo run --release --bin solana-fullnode-config -- -d > validator.json
$ cargo run --release --bin solana-fullnode-config -- -b 9000 -d > validator.json
```

```bash
Expand Down
1 change: 1 addition & 0 deletions ci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/package-lock.json
/snapcraft.credentials
7 changes: 5 additions & 2 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ steps:
agents:
- "queue=cuda"
- wait
- command: "ci/publish.sh"
- command: "ci/docker-run.sh snapcraft/xenial-amd64 ci/publish-snap.sh"
timeout_in_minutes: 20
name: "publish release artifacts"
name: "publish snap"
- command: "ci/publish-crate.sh"
timeout_in_minutes: 20
name: "publish crate"
8 changes: 7 additions & 1 deletion ci/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ fi
docker pull "$IMAGE"
shift

ARGS=(--workdir /solana --volume "$PWD:/solana" --rm)
ARGS=(
--workdir /solana
--volume "$PWD:/solana"
--env "HOME=/solana"
--rm
)

ARGS+=(--env "CARGO_HOME=/solana/.cargo")

Expand All @@ -35,6 +40,7 @@ ARGS+=(
--env BUILDKITE_TAG
--env CODECOV_TOKEN
--env CRATES_IO_TOKEN
--env SNAPCRAFT_CREDENTIALS_KEY
)

set -x
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions ci/publish-snap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash -e

cd "$(dirname "$0")/.."

DRYRUN=
if [[ -z $BUILDKITE_BRANCH || $BUILDKITE_BRANCH =~ pull/* ]]; then
DRYRUN="echo"
fi

if [[ -z "$BUILDKITE_TAG" ]]; then
SNAP_CHANNEL=edge
else
SNAP_CHANNEL=beta
fi

if [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]]; then
(
openssl aes-256-cbc -d \
-in ci/snapcraft.credentials.enc \
-out ci/snapcraft.credentials \
-k "$SNAPCRAFT_CREDENTIALS_KEY"

snapcraft login --with ci/snapcraft.credentials
) || {
rm -f ci/snapcraft.credentials;
exit 1
}
fi

set -x
snapcraft
$DRYRUN snapcraft push solana_*.snap --release $SNAP_CHANNEL
Binary file added ci/snapcraft.credentials.enc
Binary file not shown.
34 changes: 34 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: solana
version: git
summary: Blockchain, Rebuilt for Scale
description: |
710,000 tx/s with off-the-shelf hardware and no sharding.
Scales with Moore's Law.
grade: devel
confinement: strict

apps:
fullnode:
command: solana-fullnode
plugs:
- network
- network-bind
- home
fullnode-config:
command: solana-fullnode-config
plugs:
- network
- network-bind
genesis:
command: solana-genesis
genesis-demo:
command: solana-genesis-demo
mint:
command: solana-mint
mint-demo:
command: solana-mint-demo

parts:
solana:
plugin: rust
rust-channel: stable