Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo configuration logic #87

Merged
merged 46 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2edc5e4
Redo configuration logic
mayankchhabra Aug 3, 2020
5efb99b
Remove existing config files
mayankchhabra Aug 3, 2020
d55c560
Fix template paths
mayankchhabra Aug 3, 2020
14227eb
Typo
mayankchhabra Aug 3, 2020
64b6ae1
More typos
mayankchhabra Aug 3, 2020
53f6c19
Name fixes
mayankchhabra Aug 3, 2020
536453d
Use env variables in compose
mayankchhabra Aug 3, 2020
2397116
Exit on bad network
mayankchhabra Aug 3, 2020
c69763d
Config -> .env
mayankchhabra Aug 3, 2020
9eba942
URL
mayankchhabra Aug 3, 2020
8d4c161
Set default device host
mayankchhabra Aug 3, 2020
ceda868
Remove conflicts
mayankchhabra Aug 3, 2020
57239b4
Add instructions
mayankchhabra Aug 3, 2020
390e2f6
Merge branch 'master' into patch/configure
mayankchhabra Aug 3, 2020
fd77258
Merge branch 'master' into patch/configure
mayankchhabra Aug 3, 2020
57932c6
Device host
mayankchhabra Aug 3, 2020
9f556f6
RPCPASS for neutrino switcher
mayankchhabra Aug 3, 2020
fc0d94a
config -> env
mayankchhabra Aug 3, 2020
c19fa0d
Newlines
mayankchhabra Aug 3, 2020
3fe5f15
Move with force
mayankchhabra Aug 3, 2020
6b7d06b
Shh...
mayankchhabra Aug 3, 2020
9de99b1
Cleanup redundant code
mayankchhabra Aug 3, 2020
4cb6d9e
Use docker for Tor
mayankchhabra Aug 3, 2020
58f4f59
Spacings
mayankchhabra Aug 3, 2020
381e184
Typo
mayankchhabra Aug 3, 2020
2c00fc5
Use a different Tor password
mayankchhabra Aug 3, 2020
f4f496a
Harden error handling
mayankchhabra Aug 3, 2020
f027f63
Load env
mayankchhabra Aug 4, 2020
00f9550
Add variables in quotes
mayankchhabra Aug 4, 2020
583f4ca
Source env
mayankchhabra Aug 4, 2020
4f86aff
Re-add linux check
mayankchhabra Aug 4, 2020
84f21ed
Include config files in the OTA update
mayankchhabra Aug 4, 2020
5d47b18
Default mainnet
mayankchhabra Aug 4, 2020
2e1cca0
Minor wording changes
mayankchhabra Aug 4, 2020
598f687
Clean trailing whitespace
lukechilds Aug 5, 2020
cfacdb8
Quote uname check
lukechilds Aug 5, 2020
bde81fb
Correct resolve UMBREL_ROOT
lukechilds Aug 5, 2020
95f1547
Fix quoting
lukechilds Aug 5, 2020
e8bb7d2
Prevent word splitting if UMBREL_ROOT path contains spaces
lukechilds Aug 5, 2020
f8d7f84
Merge pull request #7 from lukechilds/configuration-changes
mayankchhabra Aug 5, 2020
c3653da
Naming
mayankchhabra Aug 5, 2020
f0b0528
Removed conflicts
mayankchhabra Aug 5, 2020
dde75cb
Clarify about empty dir
mayankchhabra Aug 5, 2020
554632c
Remove redundant genused check
mayankchhabra Aug 5, 2020
ec27955
ignore/unignore
mayankchhabra Aug 6, 2020
8725a97
Ignore/unignore db/
mayankchhabra Aug 6, 2020
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
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@
.ssh
.viminfo

# Files created by containers that we shouldn't accidently commit
# Files and data directories created by services
# that we shouldn't accidently commit

*.dat
*.log
*.lock
*.cookie
*.pid
*.env
bitcoin/*
lnd/*
tor/*
db/*

# Commit these empty directories

!lnd/.gitkeep
!tor/data/.gitkeep
!tor/run/.gitkeep
!db/.gitkeep

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ If you're looking to run Umbrel on:

Ensure that your account is [correctly permissioned to use docker](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).

### Step 1. Run this from your home directory (if installing on dedicated hardware)
### Step 1. Download

> It will clone this repo while preserving home directory's existing structure.
> Run this in an empty directory where you want to install Umbrel

```bash
curl -L https://github.com/getumbrel/umbrel/archive/v0.1.6-beta.3.tar.gz | tar -xz --strip-components=1
Expand All @@ -83,17 +83,17 @@ curl -L https://github.com/getumbrel/umbrel/archive/v0.1.6-beta.3.tar.gz | tar -
### Step 2. Configure

```bash
# To configure Umbrel for mainnet, run:
# To use Umbrel on mainnet, run:
./scripts/configure

# For testnet, run:
TESTNET=1 ./scripts/configure
NETWORK=testnet ./scripts/configure

# For regtest, run:
REGTEST=1 ./scripts/configure
NETWORK=regtest ./scripts/configure
```

### Step 3. Run Umbrel
### Step 3. Run

```bash
sudo ./scripts/start
Expand Down
File renamed without changes.
14 changes: 3 additions & 11 deletions contrib/partitioner/partitioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@ def main():
os.system('/bin/sed -i "s/#txindex=1/txindex=1/g;" ' + str(homedirpath) + '/bitcoin/bitcoin.conf')

'''
Setup secrets, db, bitcoin, nginx, and lnd directory.. as a new install
Setup db, bitcoin, nginx, and lnd directory.. as a new install
'''
print('Setup secrets, db, bitcoin, nginx, tor and lnd directory.. as a new install')
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data')
print('Setup db, bitcoin, nginx, tor and lnd directory.. as a new install')
os.system('/bin/cp -fr ' + homedirpath + '/db /mnt/data')
os.system('/bin/cp -fr ' + homedirpath + '/bitcoin /mnt/data')
os.system('/bin/cp -fr ' + homedirpath + '/lnd /mnt/data')
Expand All @@ -202,20 +201,15 @@ def main():

'''
Check other folders in partition3
- secrets
- db
- lnd
- nginx
- tor
'''
# Secrets folder
if not os.path.exists('/mnt/data/secrets'):
print('secrets folder does\'nt exist!')
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data')

# tor folder
if not os.path.exists('/mnt/data/tor'):
print('secrets folder does\'nt exist!')
print('tor folder does\'nt exist!')
os.system('/bin/cp -fr ' + homedirpath + '/tor /mnt/data')

# db folder
Expand Down Expand Up @@ -267,15 +261,13 @@ def main():
os.system('/bin/mount -a');

print('Remove old folders (after copying)')
os.system('/bin/rm -fr ' + homedirpath + '/secrets')
os.system('/bin/rm -fr ' + homedirpath + '/db')
os.system('/bin/rm -fr ' + homedirpath + '/bitcoin')
os.system('/bin/rm -fr ' + homedirpath + '/lnd')
os.system('/bin/rm -fr ' + homedirpath + '/tor')
os.system('/bin/rm -fr ' + homedirpath + '/nginx')
os.system('/bin/rm -fr ' + homedirpath + '/docker-compose.yml')
print('Set up symlinks')
os.system('/bin/ln -s /mnt/data/secrets ' + homedirpath + '/secrets')
os.system('/bin/ln -s /mnt/data/db ' + homedirpath + '/db')
os.system('/bin/ln -s /mnt/data/bitcoin ' + homedirpath + '/bitcoin')
os.system('/bin/ln -s /mnt/data/lnd ' + homedirpath + '/lnd')
Expand Down
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ services:
JWT_PRIVATE_KEY_FILE: "/jwt-private-key/jwt.key"
JWT_EXPIRATION: "3600"
DOCKER_COMPOSE_DIRECTORY: $PWD
DEVICE_HOST: $DEVICE_HOST
DEVICE_HOST: ${DEVICE_HOST:-http://umbrel.local}
MIDDLEWARE_API_URL: "http://10.11.2.2"
UMBREL_DASHBOARD_HIDDEN_SERVICE_FILE: "/var/lib/tor/web/hostname"
SHUTDOWN_SIGNAL_FILE: "/signals/shutdown"
Expand All @@ -129,13 +129,13 @@ services:
environment:
PORT: "3005"
BITCOIN_HOST: "10.11.1.1"
RPC_PORT: "RPCPORT"
RPC_USER: "lncm"
RPC_PASSWORD: "RPCPASS"
LND_NETWORK: "mainnet"
RPC_PORT: $BITCOIN_RPC_PORT
RPC_USER: $BITCOIN_RPC_USER
RPC_PASSWORD: $BITCOIN_RPC_PASS
LND_NETWORK: $BITCOIN_NETWORK
LND_HOST: "10.11.1.2"
JWT_PUBLIC_KEY_FILE: "/jwt-public-key/jwt.pem"
DEVICE_HOST: $DEVICE_HOST
DEVICE_HOST: ${DEVICE_HOST:-http://umbrel.local}
networks:
net:
ipv4_address: 10.11.2.2
Expand All @@ -146,12 +146,12 @@ services:
depends_on: [ bitcoin, lnd ]
restart: unless-stopped
volumes:
- "${PWD}/lnd:/lnd"
- "${PWD}/secrets:/secrets"
- "${PWD}/statuses:/statuses"
- "/var/run/docker.sock:/var/run/docker.sock"
- ${PWD}/lnd:/lnd
- ${PWD}/statuses:/statuses
- /var/run/docker.sock:/var/run/docker.sock
environment:
JSONRPCURL: http://10.11.1.1:RPCPORT
JSONRPCURL: "http://10.11.1.1:${BITCOIN_RPC_PORT}"
RPCPASS: $BITCOIN_RPC_PASS
LND_CONTAINER_NAME: lnd
SLEEPTIME: 3600
networks:
Expand Down
Empty file added lnd/.gitkeep
Empty file.
Loading