From ade3f84317efd8b5adfe97b0841f2a4da86154a5 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 15 Apr 2020 18:54:02 +0200 Subject: [PATCH 1/2] examples: add shell session snippets --- examples/deploy-container.sh | 3 +++ examples/deploy-nixops.sh | 3 +++ examples/deploy-qemu-vm.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/examples/deploy-container.sh b/examples/deploy-container.sh index 48d76ab..5912ba5 100755 --- a/examples/deploy-container.sh +++ b/examples/deploy-container.sh @@ -80,4 +80,7 @@ echo echo "Bitcoind data dir:" sudo ls -al /var/lib/containers/demo-node/var/lib/bitcoind +# Uncomment to start a shell session here +# export -f c; bash -li + # Cleanup happens at exit (see above) diff --git a/examples/deploy-nixops.sh b/examples/deploy-nixops.sh index a50aba2..b204aa9 100755 --- a/examples/deploy-nixops.sh +++ b/examples/deploy-nixops.sh @@ -38,4 +38,7 @@ nixops deploy -d bitcoin-node # Connect to node nixops ssh bitcoin-node systemctl status bitcoind +# Uncomment to start a shell session here +# bash -li + # Cleanup happens at exit (see above) diff --git a/examples/deploy-qemu-vm.sh b/examples/deploy-qemu-vm.sh index 9267c7b..a87547c 100755 --- a/examples/deploy-qemu-vm.sh +++ b/examples/deploy-qemu-vm.sh @@ -90,4 +90,7 @@ echo echo "Node info:" c nodeinfo +# Uncomment to start a shell session here +# export -f c; bash -li + # Cleanup happens at exit (see above) From 7ffbe83de3b060681eb62df461847df7d855e577 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 15 Apr 2020 18:54:03 +0200 Subject: [PATCH 2/2] README: add links to example scripts --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8dad3bf..8d0a085 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,14 @@ nix-shell The following example scripts set up a nix-bitcoin node according to `examples/configuration.nix` and then shut down immediately. They leave no traces (outside of `/nix/store`) on the host system. -- `./deploy-container.sh` creates a [NixOS container](https://github.com/erikarvstedt/extra-container).\ +- [`./deploy-container.sh`](examples/deploy-container.sh) creates a [NixOS container](https://github.com/erikarvstedt/extra-container).\ This is the fastest way to set up a node.\ Requires: [NixOS](https://nixos.org/) -- `./deploy-qemu-vm.sh` creates a QEMU VM.\ +- [`./deploy-qemu-vm.sh`](examples/deploy-qemu-vm.sh) creates a QEMU VM.\ Requires: [Nix](https://nixos.org/nix/) -- `./deploy-nixops.sh` creates a VirtualBox VM via [NixOps](https://github.com/NixOS/nixops).\ +- [`./deploy-nixops.sh`](examples/deploy-nixops.sh) creates a VirtualBox VM via [NixOps](https://github.com/NixOS/nixops).\ NixOps can be used to deploy to various other backends like cloud providers.\ Requires: [Nix](https://nixos.org/nix/), [VirtualBox](https://www.virtualbox.org)