Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.
Open
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
10 changes: 5 additions & 5 deletions config/utils/keygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
TMPFILE=`mktemp`
export PATH=$PATH:.

OS=`uname -s`
ARCH=`uname -m`

if [ ! $(type -P ethkey) ]; then
ARCH=`arch`
ETHKEY_URL=`curl -sS "https://vanity-service.parity.io/parity-binaries?version=stable&format=markdown&os=linux&architecture=$ARCH" | grep ethkey | awk {'print $5'} | cut -d"(" -f2 | cut -d")" -f1`
ETHKEY_URL=`curl -sS "https://vanity-service.parity.io/parity-binaries?version=stable&format=markdown&os=$OS&architecture=$ARCH" | grep ethkey | awk {'print $5'} | cut -d"(" -f2 | cut -d")" -f1`
wget -q $ETHKEY_URL
chmod +x ethkey
fi


# Generate the private and public keys
ethkey generate random > $TMPFILE

cat $TMPFILE | grep public | awk {'print $2'} > $1/key.pub
cat $TMPFILE | grep secret | awk {'print $2'} > $1/key.priv

rm -rf $TMPFILE


46 changes: 38 additions & 8 deletions parity-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
#!/bin/bash
# Copyright 2017 Parity Technologies (UK) Ltd.

sed() {
if [ "$(uname)" = "Darwin" ] ; then
gsed "$@"
else
command sed "$@"
fi
}

mktemp() {
if [ "$(uname)" = "Darwin" ]; then
if [ "$1" = "-p" ]; then
shift
fi
if [ $# == 2 ]; then
command mktemp $1/$2
fi
else
command mktemp $@
fi
}

CHAIN_NAME="parity"
CHAIN_NODES="1"
CLIENT="0"
Expand All @@ -26,15 +48,24 @@ NOTE:

check_packages() {

if [ $(grep -i debian /etc/*-release | wc -l) -gt 0 ] ; then
if [ ! -f /usr/bin/docker ] ; then
sudo apt-get -y install docker.io python-pip
fi
if [ "$(uname)" = "Darwin" ] ; then
if [ ! -f /usr/local/bin/docker ] ; then
brew install docker.io python-pip
fi

if [ ! -f /usr/local/bin/docker-compose ] ; then
sudo pip install docker-compose
if [ ! -f /usr/local/bin/docker-compose ] ; then
brew install docker-compose
fi
else if [ $(grep -i debian /etc/*-release | wc -l) -gt 0 ] ; then
if [ ! -f /usr/bin/docker ] ; then
sudo apt-get -y install docker.io python-pip
fi

if [ ! -f /usr/local/bin/docker-compose ] ; then
sudo pip install docker-compose
fi
fi
fi
fi
}


Expand Down Expand Up @@ -185,7 +216,6 @@ create_node_config_instantseal() {
}

expose_container() {

sed -i "s@container_name: $1@&\n ports:\n - 8080:8080\n - 8180:8180\n - 8545:8545\n - 8546:8546\n - 30303:30303@g" docker-compose.yml

}
Expand Down