Happy is only supported on Linux due to its strong dependence on Linux network namespaces.
Install
- Install required libraries:
sudo apt-get install python-setuptools bridge-utils python-lockfile python-psutil make - Clone the repository:
git clone https://github.com/openweave/happy.git - Install Happy:
Thecd happymakemakecommand performs two tasks:- Creates a Happy python package at
/usr/local/lib/python2.7/dist-packages - Copies Happy shell scripts to
/usr/local/bin
- Creates a Happy python package at
- Validate the installation by running a Happy command:
happy-stateState Name: happyNETWORKS Name Type State PrefixesNODES Name Interface Type IPs
Weave support
Happy supports Weave via OpenWeave, which requires an OpenWeave build and some additional configuration. The quickest way to integrate OpenWeave with Happy is to build the standalone application.
- Install the build toolchain and all dependencies required for OpenWeave:
sudo apt-get updatesudo apt-get install -y autotools-dev build-essential git lcov /libdbus-1-dev libglib2.0-dev libssl-dev /libudev-dev python2.7 python-software-propertiessudo apt-get install -y --force-yes gcc-arm-none-eabisudo apt-get update -qq - Clone the OpenWeave repository:
git clone https://github.com/openweave/openweave-core.git - Build the standalone OpenWeave application:
cd <path-to-openweave-core>make -f Makefile-Standalone - Set the Weave path in the Happy configuration:
happy-configuration weave_path <path-to-openweave-core>/build/x86_64-unknown-linux-gnu/src/test-apps - Update the
$PATHenvironment variable so it knows where to find Happy-related binaries for Weave:export PATH=$PATH:<path-to-openweave-core>/src/test-apps/happy/bin - Test the configuration. You should be able to run Weave commands for Happy:
weave-stateState Name: weaveNODES Name Weave Node Id Pairing CodeFABRIC Fabric Id Global Prefix
Uninstall
- Ensure all virtual nodes and networks are deleted:
happy-state-delete - Uninstall Happy:
cd <path-to-happy>make uninstall - Delete any other remaining Happy files:
rm -f ~/.happy_state.jsonrm -f ~/.happy_conf.jsonrm -f ~/.happy_state.json.lockcd /usr/local/lib/python2.7/dist-packagesrm -f happy*
If you use an advanced feature like parallel states, each state should be individually deleted. See Uninstall with parallel states for more information.