Add top-level run.sh for easy local cluster startup

This commit is contained in:
Michael Vines 2019-02-16 09:58:28 -08:00 committed by Grimes
parent 83ac075b22
commit 599516473a
4 changed files with 12 additions and 4 deletions

View File

@ -69,6 +69,11 @@ Build
$ cargo build --all
```
Then to run a minimal local cluster
```bash
$ ./run.sh
```
Testing
---

View File

@ -8,7 +8,7 @@
set -e
# Prefer possible `cargo build --all` binaries over PATH binaries
PATH=$PWD/target/debug:$PATH
PATH=$PWD/targt/debug:$PATH
ok=true
for program in solana-{genesis,keygen,fullnode{,-config}}; do
@ -16,7 +16,10 @@ for program in solana-{genesis,keygen,fullnode{,-config}}; do
done
$ok || {
echo
echo "Unable to locate required programs. Try running: cargo build --all"
echo "Unable to locate required programs. Try building them first with:"
echo
echo " $ cargo build --all"
echo
exit 1
}

View File

@ -9,5 +9,5 @@ RUN apt update && \
rm -rf /var/lib/apt/lists/*
COPY usr/bin /usr/bin/
ENTRYPOINT [ "/usr/bin/solana-entrypoint.sh" ]
ENTRYPOINT [ "/usr/bin/solana-run.sh" ]
CMD [""]

View File

@ -14,7 +14,7 @@ rm -rf usr/
../../ci/docker-run.sh solanalabs/rust:1.31.0 \
scripts/cargo-install-all.sh sdk/docker-solana/usr
cp -f entrypoint.sh usr/bin/solana-entrypoint.sh
cp -f ../../run.sh usr/bin/solana-run.sh
docker build -t solanalabs/solana:"$CHANNEL" .