From cd4bccfd12185385be19c174f16b63dd75a746a9 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 2 Mar 2019 17:08:46 -0800 Subject: [PATCH] Remove snap support --- README.md | 5 +- RELEASE.md | 3 +- book/src/getting-started.md | 92 ------------------------ ci/buildkite-secondary.yml | 3 - ci/buildkite.yml | 4 -- ci/docker-run.sh | 1 - ci/docker-snapcraft/Dockerfile | 7 -- ci/docker-snapcraft/build.sh | 7 -- ci/pr-snap.sh | 13 ---- ci/publish-snap.sh | 65 ----------------- ci/snapcraft.credentials.enc | Bin 2528 -> 0 bytes ci/testnet-deploy.sh | 25 +------ ci/testnet-manager.sh | 2 +- multinode-demo/bootstrap-leader.sh | 13 ---- multinode-demo/common.sh | 29 +------- multinode-demo/fullnode.sh | 61 +++++----------- net/README.md | 8 +-- net/net.sh | 67 +---------------- net/remote/remote-client.sh | 6 -- net/remote/remote-node.sh | 82 --------------------- net/remote/remote-sanity.sh | 13 ---- scripts/snap-config-to-env.sh | 18 ----- snap/README.md | 17 ----- snap/hooks/configure | 44 ------------ snap/snapcraft.yaml | 111 ----------------------------- 25 files changed, 30 insertions(+), 666 deletions(-) delete mode 100644 ci/docker-snapcraft/Dockerfile delete mode 100755 ci/docker-snapcraft/build.sh delete mode 100755 ci/pr-snap.sh delete mode 100755 ci/publish-snap.sh delete mode 100644 ci/snapcraft.credentials.enc delete mode 100755 scripts/snap-config-to-env.sh delete mode 100644 snap/README.md delete mode 100755 snap/hooks/configure delete mode 100644 snap/snapcraft.yaml diff --git a/README.md b/README.md index 43fe846167..c184d1112c 100644 --- a/README.md +++ b/README.md @@ -110,10 +110,7 @@ We maintain several testnets: They are deployed with the `ci/testnet-manager.sh` script through a list of [scheduled buildkite jobs](https://buildkite.com/solana-labs/testnet-management/settings/schedules). -Each testnet can be manually manipulated from buildkite as well. The `-perf` -testnets use a release tarball while the non`-perf` builds use the snap build -(we've observed that the snap build runs slower than a tarball but this has yet -to be root caused). +Each testnet can be manually manipulated from buildkite as well. ## How do I reset the testnet? Manually trigger the [testnet-management](https://buildkite.com/solana-labs/testnet-management) pipeline diff --git a/RELEASE.md b/RELEASE.md index 90a53f838d..fa8ed9f15d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,8 +43,7 @@ the `master` branch as late as possible prior to the milestone release. ### v*X.Y.Z* release tag The release tags are created as desired by the owner of the given stabilization -branch, and cause that *X.Y.Z* release to be shipped to https://crates.io, -https://snapcraft.io/, and elsewhere. +branch, and cause that *X.Y.Z* release to be shipped to https://crates.io Immediately after a new v*X.Y.Z* branch tag has been created, the `Cargo.toml` patch version number (*Z*) of the stabilization branch is incremented by the diff --git a/book/src/getting-started.md b/book/src/getting-started.md index e5311ce760..a43dee49a0 100644 --- a/book/src/getting-started.md +++ b/book/src/getting-started.md @@ -166,95 +166,3 @@ $ ./multinode-demo/client.sh --network $(dig +short testnet.solana.com):8001 --d You can observe the effects of your client's transactions on our [dashboard](https://metrics.solana.com:3000/d/testnet/testnet-hud?orgId=2&from=now-30m&to=now&refresh=5s&var-testnet=testnet) -## Linux Snap - -A Linux [Snap](https://snapcraft.io/) is available, which can be used to easily -get Solana running on supported Linux systems without building anything from -source for evaluation. Note that CUDA is not supported by the Snap so -performance will be limited. - -The `edge` Snap channel is updated daily with the latest -development from the `master` branch. To install: - -```bash -$ sudo snap install solana --edge --devmode -``` - -Once installed the usual Solana programs will be available as `solona.*` instead -of `solana-*`. For example, `solana.fullnode` instead of `solana-fullnode`. - -Update to the latest version at any time with: - -```bash -$ snap info solana -$ sudo snap refresh solana --devmode -``` - -### Daemon Support -The snap supports running fullnodes and a drone as system daemons. - -Run `sudo snap get solana` to view the current daemon configuration. To view -daemon logs: -1. Run `sudo snap logs -n=all solana` to view the daemon initialization log -2. Runtime logging can be found under `/var/snap/solana/current/bootstrap-leader/`, -`/var/snap/solana/current/fullnode/`, or `/var/snap/solana/current/drone/` depending -on which `mode=` was selected. Within each log directory the file `current` -contains the latest log, and the files `*.s` (if present) contain older rotated -logs. - -Disable the daemon at any time by running: - -```bash -$ sudo snap set solana mode= -``` - -Runtime configuration files for the daemon can be found in -`/var/snap/solana/current/config`. - -#### Leader Daemon - -```bash -$ sudo snap set solana mode=bootstrap-leader -``` - -`rsync` must be configured and running on the leader. - -1. Ensure rsync is installed with `sudo apt-get -y install rsync` -2. Edit `/etc/rsyncd.conf` to include the following -```ini -[config] -path = /var/snap/solana/current/config -hosts allow = * -read only = true -``` -3. Run `sudo systemctl enable rsync; sudo systemctl start rsync` -4. Test by running `rsync -Pzravv rsync:///config -solana-config` from another machine. **If the leader is running on a cloud -provider it may be necessary to configure the Firewall rules to permit ingress -to port tcp:873, tcp:9900 and the port range udp:8000-udp:10000** - - -To run both the Leader and Drone: - -```bash -$ sudo snap set solana mode=bootstrap-leader+drone - -``` - -#### Validator daemon - -```bash -$ sudo snap set solana mode=fullnode - -``` - -By default the node will attempt to connect to **testnet.solana.com**, override the -cluster entrypoint IP address by running: - -```bash -$ sudo snap set solana mode=fullnode entrypoint-ip=127.0.0.1 #<-- change IP address -``` - -It's assumed that the node at the entrypoint IP will be running `rsync` -configured as described in the previous **Leader daemon** section. - diff --git a/ci/buildkite-secondary.yml b/ci/buildkite-secondary.yml index cb38358b5b..8fe33c4ccc 100644 --- a/ci/buildkite-secondary.yml +++ b/ci/buildkite-secondary.yml @@ -1,7 +1,4 @@ steps: - #- command: "ci/publish-snap.sh" - # timeout_in_minutes: 40 - # name: "publish snap" - command: "sdk/docker-solana/build.sh" timeout_in_minutes: 20 name: "publish docker" diff --git a/ci/buildkite.yml b/ci/buildkite.yml index da334079f7..f8ea821f1f 100644 --- a/ci/buildkite.yml +++ b/ci/buildkite.yml @@ -26,10 +26,6 @@ steps: # timeout_in_minutes: 20 # agents: # - "queue=large" - - command: "ci/pr-snap.sh" - timeout_in_minutes: 20 - name: "snap" - branches: "pull/*" - wait - trigger: "solana-secondary" branches: "!pull/*" diff --git a/ci/docker-run.sh b/ci/docker-run.sh index ea1521500d..179014006b 100755 --- a/ci/docker-run.sh +++ b/ci/docker-run.sh @@ -71,7 +71,6 @@ ARGS+=( --env CI --env CODECOV_TOKEN --env CRATES_IO_TOKEN - --env SNAPCRAFT_CREDENTIALS_KEY ) if $INTERACTIVE; then diff --git a/ci/docker-snapcraft/Dockerfile b/ci/docker-snapcraft/Dockerfile deleted file mode 100644 index 9f74ae9ab8..0000000000 --- a/ci/docker-snapcraft/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM snapcraft/xenial-amd64 - -# Update snapcraft to latest version -RUN apt-get update -qq \ - && apt-get install -y snapcraft daemontools \ - && rm -rf /var/lib/apt/lists/* \ - && snapcraft --version diff --git a/ci/docker-snapcraft/build.sh b/ci/docker-snapcraft/build.sh deleted file mode 100755 index 611507b881..0000000000 --- a/ci/docker-snapcraft/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -ex - -cd "$(dirname "$0")" - -docker build -t solanalabs/snapcraft . -docker push solanalabs/snapcraft diff --git a/ci/pr-snap.sh b/ci/pr-snap.sh deleted file mode 100755 index 59cecf5d62..0000000000 --- a/ci/pr-snap.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# -# Only run publish-snap.sh for pull requests that modify files under /snap -# -set -e -cd "$(dirname "$0")"/.. - -ci/affects-files.sh ^snap/ || { - echo "Skipping snap build as no files under /snap were modified" - exit 0 -} - -exec ci/publish-snap.sh diff --git a/ci/publish-snap.sh b/ci/publish-snap.sh deleted file mode 100755 index 98eb9fbdfc..0000000000 --- a/ci/publish-snap.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -set -e - -cd "$(dirname "$0")/.." - -# This job doesn't run within a container, try once to upgrade tooling on a -# version check failure -ci/version-check-with-upgrade.sh stable - -DRYRUN= -if [[ -z $BUILDKITE_BRANCH ]]; then - DRYRUN="echo" -fi - -if ./ci/is-pr.sh; then - DRYRUN="echo" - CHANNEL="none (pullrequest)" -fi - -eval "$(ci/channel-info.sh)" - -if [[ -z $CHANNEL ]]; then - echo Unable to determine channel to publish into, exiting. - exit 1 -fi - -if [[ -z $DRYRUN ]]; then - [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]] || { - echo SNAPCRAFT_CREDENTIALS_KEY not defined - exit 1; - } - ( - 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 - -echo --- checking for multilog -if [[ ! -x /usr/bin/multilog ]]; then - if [[ -z $CI ]]; then - echo "multilog not found, install with: sudo apt-get install -y daemontools" - exit 1 - fi - sudo apt-get install -y daemontools -fi - -echo "--- build: $CHANNEL channel" -snapcraft - -source ci/upload-ci-artifact.sh -upload-ci-artifact solana_*.snap - -if [[ -z $DO_NOT_PUBLISH_SNAP ]]; then - echo "--- publish: $CHANNEL channel" - $DRYRUN snapcraft push solana_*.snap --release "$CHANNEL" -fi diff --git a/ci/snapcraft.credentials.enc b/ci/snapcraft.credentials.enc deleted file mode 100644 index e8f351bd9bd68f00e1f9e85d6b89379d1b7cd216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2528 zcmV<62_N=TVQh3|WM5wr(#w=4z&m#M4^t4ob`dlASfZLnR&oE{&u}H^W_D7fceum! zM%qX_I1@4M-g?EO_)TR$*aIN2c3ad0G_-Nr2d{|(_;pCz-C?Um1gp8Y z0cSH}k=;SLVp$-*c4I_g*JU6)@y6JtXj0Oe^TVCGPjkWO%8-pAuBf6Db|8V%8DU-| z%&TG&=-l` z6~)=Sf=HmkV#VV2nNLT?^%DmG?CAcr+*BXcbdxkQYScT%HEgss`FNfaj9-oiRnDbw zphB(94OIR2Q=VB>@1HV<;k!CYfcJU0J?ZpCj7z;X z3|aC4i=qB{E&z6iy z0>JjqEei%&fT=X%YDdnX16FdS1$|Mx2@3X8lg_l6(u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