mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-23 19:31:00 +08:00
update ubuntu install script to change naming of portal to browser, and correct git branches
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
We provide a [script](../images/scripts/ubuntu-17.04.sh) which will
|
||||
perform all the steps outlined in this doc (except for creating a protocol handler -- see the bottom of the doc). The script creates a virtualenv of
|
||||
Blockstack Core and installs Portal in a subdirectory. It additionally creates some
|
||||
scripts for starting Core and Portal together.
|
||||
Blockstack Core and installs Browser in a subdirectory. It additionally creates some
|
||||
scripts for starting Core and Browser together.
|
||||
|
||||
However, if you'd like to customize your install, step through it
|
||||
yourself, or you are on a different distro, continue on with this doc!
|
||||
@@ -24,12 +24,12 @@ pip install virtualenv
|
||||
virtualenv --python=python2.7 ~/.blockstack.venv/ && source ~/.blockstack.venv/bin/activate
|
||||
```
|
||||
|
||||
Let's install virtualchain 0.14.2 and blockstack 0.14.2
|
||||
Let's install virtualchain 0.14.3 and blockstack 0.14.3
|
||||
|
||||
```
|
||||
sudo apt install git
|
||||
pip install git+https://github.com/blockstack/virtualchain.git@rc-0.14.2
|
||||
pip install git+https://github.com/blockstack/blockstack-core.git@rc-0.14.2
|
||||
pip install git+https://github.com/blockstack/virtualchain.git@rc-0.14.3
|
||||
pip install git+https://github.com/blockstack/blockstack-core.git@rc-0.14.3
|
||||
```
|
||||
|
||||
Get Blockstack core configured with default settings and choose your Bitcoin wallet password
|
||||
@@ -37,7 +37,7 @@ Get Blockstack core configured with default settings and choose your Bitcoin wal
|
||||
blockstack setup -y --password BITCOIN_WALLET_PASSWORD --debug
|
||||
```
|
||||
|
||||
# Setting up Blockstack Portal Node Application
|
||||
# Setting up Blockstack Browser Node Application
|
||||
|
||||
Install NodeJS through NodeSource PPA
|
||||
|
||||
@@ -46,20 +46,20 @@ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
|
||||
sudo apt install -y nodejs
|
||||
```
|
||||
|
||||
Download Blockstack Portal and install its dependencies
|
||||
Download Blockstack Browser and install its dependencies
|
||||
|
||||
```
|
||||
git clone https://github.com/blockstack/blockstack-portal.git -bv0.8
|
||||
cd blockstack-portal
|
||||
git clone https://github.com/blockstack/blockstack-browser.git -bv0.11.1
|
||||
cd blockstack-browser
|
||||
npm install node-sass
|
||||
npm install
|
||||
```
|
||||
|
||||
Note that `blockstack-portal` depends on `node-sass` which can sometimes install strangely on Linux, running `npm install node-sass` before trying to install the other dependencies solves that problem.
|
||||
Note that `blockstack-browser` depends on `node-sass` which can sometimes install strangely on Linux, running `npm install node-sass` before trying to install the other dependencies solves that problem.
|
||||
|
||||
# Running Blockstack Portal
|
||||
# Running Blockstack Browser
|
||||
|
||||
Now we're ready to run our Core API service and start the Portal node app.
|
||||
Now we're ready to run our Core API service and start the Browser node app.
|
||||
|
||||
First, start the Core API service.
|
||||
|
||||
@@ -79,7 +79,7 @@ Start the Node Application
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Then you can open `http://localhost:3000/` in your browser to get to the portal.
|
||||
Then you can open `http://localhost:3000/` in your browser to get to the Blockstack Browser.
|
||||
|
||||
|
||||
You can copy your api password to your clipboard with this command:
|
||||
@@ -100,7 +100,7 @@ With the following contents:
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=bash -c 'xdg-open http://localhost:3000/auth?authRequest=$(echo "%u" | sed s,blockstack:/*,,)'
|
||||
Name=Blockstack-Portal
|
||||
Name=Blockstack-Browser
|
||||
MimeType=x-scheme-handler/blockstack;
|
||||
```
|
||||
|
||||
@@ -111,4 +111,4 @@ $ chmod +x ~/.local/share/applications/blockstack.desktop
|
||||
$ xdg-mime default blockstack.desktop x-scheme-handler/blockstack
|
||||
```
|
||||
|
||||
Now, `blockstack:` protocol URLs should get handled by your Blockstack Portal. If you're running Portal in your browser's private mode, you may have to copy and paste the link, as this protocol handler will try to open in a regular browser window.
|
||||
Now, `blockstack:` protocol URLs should get handled by your Blockstack Browser. If you're running Browser in your browser's private mode, you may have to copy and paste the link, as this protocol handler will try to open in a regular browser window.
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# This script will create a folder `blockstack` in your current directory
|
||||
# this folder will contain:
|
||||
# a Python virtualenv with Blockstack-Core
|
||||
# a git clone of the Blockstack-Portal node app
|
||||
# a git clone of the Blockstack-Browser node app
|
||||
# (with dependencies installed)
|
||||
# a `bin` directory with scripts:
|
||||
# blockstack_portal_start.sh -> for starting core and portal
|
||||
# blockstack_portal_stop.sh -> for stopping portal
|
||||
# blockstack_browser_start.sh -> for starting core and browser
|
||||
# blockstack_browser_stop.sh -> for stopping browser
|
||||
# blockstack_core_stop.sh -> for stopping core
|
||||
# blockstack_copy_api_pass.sh-> copies the API key to the clipboard
|
||||
#
|
||||
@@ -82,25 +82,25 @@ virtualenv --python=python2.7 "$CORE_VENV"
|
||||
cd "$DIR"
|
||||
|
||||
git clone https://github.com/blockstack/blockstack-browser.git -bv0.11.1
|
||||
cd blockstack-portal
|
||||
cd blockstack-browser
|
||||
|
||||
npm install node-sass
|
||||
npm install
|
||||
|
||||
echo "Installed Blockstack Core + Portal!"
|
||||
echo "Installed Blockstack Core + Browser!"
|
||||
|
||||
# make some bin scripts.
|
||||
|
||||
mkdir "$DIR/bin"
|
||||
cd "$DIR/bin"
|
||||
|
||||
START_PORTAL_NAME=blockstack_portal_start.sh
|
||||
STOP_PORTAL_NAME=blockstack_portal_stop.sh
|
||||
START_PORTAL_NAME=blockstack_browser_start.sh
|
||||
STOP_PORTAL_NAME=blockstack_browser_stop.sh
|
||||
STOP_CORE_NAME=blockstack_core_stop.sh
|
||||
COPY_API_NAME=blockstack_copy_api_pass.sh
|
||||
|
||||
echo "#!/bin/bash" > $START_PORTAL_NAME
|
||||
echo "cd \"$DIR/blockstack-portal\"" >> $START_PORTAL_NAME
|
||||
echo "cd \"$DIR/blockstack-browser\"" >> $START_PORTAL_NAME
|
||||
echo "\"$CORE_VENV/bin/python\" \"$CORE_VENV/bin/blockstack\" api status -y | grep 'true' > /dev/null" >> $START_PORTAL_NAME
|
||||
echo "if [ \$? -ne 0 ]; then" >> $START_PORTAL_NAME
|
||||
echo "\"$CORE_VENV/bin/python\" \"$CORE_VENV/bin/blockstack\" api start -y --debug" >> $START_PORTAL_NAME
|
||||
@@ -118,7 +118,7 @@ echo "#!/bin/bash" > $STOP_PORTAL_NAME
|
||||
echo "tokill=\$(cat /tmp/dev.pid)" >> $STOP_PORTAL_NAME
|
||||
echo "echo 'Terminating process group of \$tokill'" >> $STOP_PORTAL_NAME
|
||||
echo "kill -s SIGTERM -\$(ps -o pgid= \$tokill | cut -d\\ -f2)" >> $STOP_PORTAL_NAME
|
||||
echo "echo 'Killed Blockstack Portal'" >> $STOP_PORTAL_NAME
|
||||
echo "echo 'Killed Blockstack Browser'" >> $STOP_PORTAL_NAME
|
||||
|
||||
echo "#!/bin/bash" > $STOP_CORE_NAME
|
||||
echo "\"$CORE_VENV/bin/python\" \"$CORE_VENV/bin/blockstack\" api stop -y" >> $STOP_CORE_NAME
|
||||
@@ -134,3 +134,13 @@ chmod +x $STOP_CORE_NAME
|
||||
|
||||
echo "Made app scripts!"
|
||||
echo "You can add bins to your path with \$ export PATH=\$PWD/blockstack/bin:\$PATH"
|
||||
echo "You may need to add a protocol handler for your system, add a .desktop like the following and it should work: "
|
||||
echo
|
||||
echo "[Desktop Entry]"
|
||||
echo "Type=Application"
|
||||
echo "Terminal=false"
|
||||
echo "Exec=bash -c 'xdg-open http://localhost:3000/auth?authRequest=\$(echo \"%u\" | sed s,blockstack:/*,,)'"
|
||||
echo "Name=Blockstack-Browser"
|
||||
echo "MimeType=x-scheme-handler/blockstack;"
|
||||
echo
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user