Giter Club home page Giter Club logo

omni-devops's Introduction

Omniwallet, OmniEngine, and Master Core Devops

Deployment and management scripts for the new OmniEngine-based Omniwallet.

Omniwallet consists of 4 main components/servers:

  1. Master Core RPC Server
  2. PostgreSQL Database Server
  3. OmniEngine Server
  4. Omniwallet Server

Although it is possible to deploy all four servers in a single virtual (or physical) machine, it is recommended to use four seprate VMs and these scripts are currently designed to build and deploy 4 separate VMs.

Prerequisites

  • Virtual Box 4.3.10 or later
  • Vagrant 1.6.2 or later

Vagrant is available for Mac OS X, Windows, and Linux. In addition to VirtualBox, Vagrant may be used to provision VMWare, AWS and other virtual environments.

Base Box

The Vagrantfile is currently using (trusting) the ubuntu/trusty64 base box created by Ubuntu and the Mastercoin base box msgilligan/mastercoin-ubuntu-base.

You should consider them untrusted binaries. Only use them with TEST-MSC and small amounts of Bitcoin.

Installing Prerequisites

  1. Install VirtualBox

  2. Install Vagrant

  3. Clone this repository and check out the 'master' branch

     $ git clone [email protected]:mastercoin-MSC/omni-devops.git
     $ cd omni-devops
    

Installing support for AWS

The instructions for setting up the various servers include the --provider=aws option which require that Vagrant have support for AWS installed and a AWS base box named "omni-aws" created. (It is possible to use Vagrant with VirtualBox, in which case you can skip this section and ommit the --provider=aws argument)

  1. Install the Vagrant AWS plugins

     $ vagrant plugin install vagrant-aws
     $ vagrant plugin install vagrant-awsinfo
    
  2. Create the Omni AWS Vagrant Base Box

     $ ./make-omni-aws-vagrant-box.sh
    

Master Core RPC Server Setup

  1. Create and boot a VM with Vagrant and install Master Core

     $ vagrant up mastercore --provider=aws
    
  2. Connect to the VirtualBox VM

     $ vagrant ssh mastercore
    
  3. Open the bitcoin.conf with an editor, e.g.

     $ vi /etc/bitcoin/bitcoin.conf
    
  4. Make sure the following configuration options in bitcoin.conf are set correctly: rpcuser, rpcpassword, rpcallowip, rpcssl.

  5. Start the Master Core daemon:

      $ sudo service mastercored start
    
  6. Record the rpcuser, rpcpassword values as well as the IP address of the server for use in OmniEngine configuration.

The Master Core daemon is now running as an Ubuntu service and will be automatically restarted upon system reboots as well as if the daemon crashes.

PostgreSQL Database Server Setup

Althought PostgreSQL may be run in a general purpose VM, development at the Mastercoin Foundation has been focused upon using the RDS database service provided by Amazon.

To create your own PostgreSQL instance using Amazon RDS, follow these steps:

  1. Make sure you have the AWS EC2 Tools and AWS RDS Tools installed corectly.

  2. Make sure you have the Groovy language installed correctly.

  3. Copy the environment setup template file.

     $ cp setup-omni-template.sh setup-omni-private.sh
     $ chmod 700 setup-omni-private.sh
    
  4. Edit setup-omni-private.sh and make sure to set (at least) the following variables: AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_CREDENTIAL_FILE, PGUSER, PGPASSWORD, OMNI_DB_INSTANCE, OMNI_DB_SEC_GID

  5. Run the following commands:

     $ source setup-omni-private.sh
     $ cd rds
     $ ./create-omnidb-instance.sh
     $ ./waitForDBAvailable.groovy
    
  6. Use the ./list-rds-instances.sh command to find the hostname of the RDS instance

OmniEngine Server Setup

  1. Edit omniengine-synced/bitcoin.conf and omniengine-synced/sql.conf to contain the correct host, username, and password values for the DB and Master Core RPC servers.

  2. Create and boot a VM with Vagrant and install and run OmniEngine

     $ vagrant up omniengine --provider=aws
    

Omniwallet Server Setup

To be written.

omni-devops's People

Contributors

msgilligan avatar

Watchers

 avatar James Cloos avatar

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.