Code Monkey home page Code Monkey logo

immutability-project's Introduction

Immutability

How to play with Vault and Ethereum

AUDIENCE

It is my experience that the Ethereum community and the community that uses HashiCorp tools (like Vault) are nearly disjoint sets. So, I am trying to develop a set of recipes for bridging this gap. I expect the Vault folks may not need the Vault installation scripts and the Ethereum guys may not need the Ethereum installation scripts; but, both are provided - assuming that a basic set of dependencies are available.

Why should these 2 communities work together (or at least synergistically?) I believe that the blockchain revolution will be best realized as an outcome of the efforts of the Ethereum community. Ethereum is the healthiest, most innovative and least annoying of the various blockchain sects - their vision (a global computer rooted in a trustless ecosystem) is easily the most exciting. Ethereum re-defines serverless. And the HashiCorp community has codified the best ideas in the immutable infrastructure space.

That the immutable ledger community hasn't joined forces with the immutable infrastructure community is fairly startling to me. Perhaps this will be a small step towards that synergy.

Note: I am working on an article that walks through installation and demonstrates playing with these tools. I will link here when that is finished.

PREREQUISITES

There a few things you must install before you can play with Vault and Ethereum. The software installation game can be tremendously daunting. I have tried to make it as basic as possible in order to allow you to have a satisfying engagement as soon as possible. So many things can go wrong if basic dependencies aren't satisfied, and often the rabbit hole of establishing dependencies is so fraught with challenges that some developers give up before they have a chance to even start. I want to emphasize that patience is its own reward when you are working with modern technology, but I am sympathetic, so, I will try to keep the basic dependencies to a minimum.

Operating System

The Vault-Ethereum plugin currently supports macOS and Linux on AMD64 hardware. While golang does support cross compilation for many environments, the geth codebase (because of some lower level C-language dependencies) requires extra work for cross-compilation. I haven't taken on this effort yet (hint), so I have only built releases of the Vault-Ethereum plugin for macOS (darwin) and Linux on AMD64.

I have tested this plugin on these OS versions:

  • macOS Sierra Version 10.12.6
  • Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-92-generic x86_64)

Docker

To avoid some dependency-hell, I use Docker for the Ethereum components of this ecosystem. You need to install Docker to make use of geth. If you already have geth installed, then you should be fine. But, the Ethereum tools that I describe the installation of require Docker.

I have successfully used this ecosystem with this Docker version. If you have challenges with a higher version, please let me know:

$ docker version
Client:
 Version:      17.09.1-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:22:25 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.09.1-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:28:28 2017
 OS/Arch:      linux/amd64
 Experimental: false

Keybase

Keybase is a wonderful tool for managing PGP identities. I use it for signature verification and encryption of Vault keys (described later.) My Vault install scripts require the use of Keybase. If you don't want to install Keybase, then you will need to modify the scripts accordingly. The Vault-Ethereum plugin is signed with Immutability's PGP key. Once you have installed Keybase, feel free to reach out to me via Keybase's encrypted chat.

I have successfully used these scripts with this Keybase version. If you have challenges with a higher version, please let me know:

$ keybase version
Client:  1.0.38-20171220205307+f5d54bc77
Service: 1.0.38-20171220205307+f5d54bc77

That's it for the dependencies, let's have some fun.

  1. INSTALL VAULT AND VAULT-ETHEREUM PLUG-IN
  2. INSTALL ETHEREUM

Donations?

Send ETH to 0x4169c9508728285e8A9f7945D08645Bb6b3576e5 and you will be blessed in the next life.

Donations Accepted

immutability-project's People

Stargazers

Cainã Zampieri avatar  avatar Praveen Yadav avatar Nick Papirniy avatar Brian Chamberlain avatar Mariano Julio Vicario avatar  avatar sam bacha avatar  avatar Can Evgin avatar Chris avatar Simon KP avatar satish viswanatham avatar Kirill Beresnev avatar Andrejs Agejevs avatar Igor Barinov avatar Randy Burgess avatar

Watchers

Simon KP avatar Randy Burgess avatar James Cloos avatar immutability avatar Dale Shin avatar  avatar

immutability-project's Issues

install_vault.sh fails on copy vault to /usr/local/bin on Linux Mint 18.3

Detailed Description

The install script fails to copy the vault executable to /usr/local/bin/ and fails soon after because after that mv failure the script apparently depends on the vault executable being in the correct place. The dependency on jq isn't listed in the instructions either, or I missed it somehow.

Here is where the script fails without trying to workaround the issue.
mv: cannot create regular file '/usr/local/bin/vault': Permission denied
./install_vault.sh: line 122: vault: command not found
./install_vault.sh: line 127: jq: command not found
▶ ERROR For user "./ultiweb_VAULT_TOKEN.txt": Invalid key-value identity: ./ultiweb_VAULT_TOKEN.txt
Keybase encryption failed!

I tried running the script with sudo but that fails also with an error stating that the script can't be run with root permissions.

I've installed jq and moved vault to /usr/local/bin, removed ~/etc/vault.d, re-cloned the repo and rerun the script and it runs into another issue.
mv: replace '/usr/local/bin/vault', overriding mode 0755 (rwxr-xr-x)? n
Error initializing: Put https://localhost:8200/v1/sys/init: dial tcp 127.0.0.1:8200: getsockopt: connection refused

This last error is not a firewall issue. I disabled the firewall completely and same error after deleting, re-cloning, etc. I'm stuck here as far as working around the issues.

Context

I want to run through your vault tutorial on Linux. :-) https://www.hashicorp.com/blog/using-vault-to-build-an-ethereum-wallet

Everyone on Linux would be able to run vault on Linux/Ubuntu/Mint, at least this version of the repo.

Possible Implementation

Run the mv command with sudo, which should ask me for my password. I'm not sure how to implement it but I have run bash scripts that probably run a subshell and use sudo, then go back to the spawning shell.

Your Environment

  • Version used: 79f440b refs/heads/master@{0}: clone: from https://github.com/immutability-io/immutability-project.git
  • Environment name and version (e.g. Chrome 39, node.js 5.4): Linux [hostname] 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Operating System and version (desktop or mobile): laptop/desktop
  • Link to your project:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.