|
| 1 | +# gecko |
| 2 | + |
| 3 | +## Installation |
| 4 | + |
| 5 | +AVA is an incredibly lightweight protocol, so the minimum computer requirements are quite modest. |
| 6 | + |
| 7 | +- Hardware: 2 GHz or faster CPU, 3 GB RAM, 250 MB hard disk. |
| 8 | +- OS: Ubuntu >= 18.04 or Mac OS X >= Catalina. |
| 9 | +- Software: [Go](https://golang.org/doc/install) version >= 1.13.X and set up [`$GOPATH`](https://github.com/golang/go/wiki/SettingGOPATH). |
| 10 | +- Network: IPv4 or IPv6 network connection, with an open public port. |
| 11 | + |
| 12 | +### Native Install |
| 13 | + |
| 14 | +Ubuntu users need the following libraries: |
| 15 | + |
| 16 | +* libssl-dev |
| 17 | +* libuv1-dev |
| 18 | +* cmake |
| 19 | +* make |
| 20 | +* curl |
| 21 | +* g++ |
| 22 | + |
| 23 | +Install the libraries: |
| 24 | + |
| 25 | +```sh |
| 26 | +sudo apt-get install libssl-dev libuv1-dev cmake make curl g++ |
| 27 | +``` |
| 28 | + |
| 29 | +#### Downloading Gecko Source Code |
| 30 | + |
| 31 | +Clone the Gecko repository: |
| 32 | + |
| 33 | +```sh |
| 34 | +cd $GOPATH |
| 35 | +mkdir -p src/github.com/ava-labs |
| 36 | +cd src/github.com/ava-labs |
| 37 | +git clone https://github.com/ava-labs/gecko.git |
| 38 | +cd gecko |
| 39 | +``` |
| 40 | + |
| 41 | +#### Building the Gecko Executable |
| 42 | + |
| 43 | +Build Gecko using the build script: |
| 44 | + |
| 45 | +```sh |
| 46 | +./scripts/build.sh |
| 47 | +``` |
| 48 | + |
| 49 | +The Gecko binary, named `ava`, is in the `build` directory. |
| 50 | + |
| 51 | +### Docker Install |
| 52 | + |
| 53 | +- Make sure you have docker installed on your machine (so commands like `docker run` etc. are available). |
| 54 | +- Build the docker image of latest gecko branch by `scripts/build_image.sh`. |
| 55 | +- Check the built image by `docker image ls`, you should see some image tagged |
| 56 | + `gecko-xxxxxxxx`, where `xxxxxxxx` is the commit id of the Gecko source it was built from. |
| 57 | +- Test Gecko by `docker run -ti -p 9651:9651 gecko-xxxxxxxx /gecko/build/ava |
| 58 | + --public-ip=127.0.0.1 --snow-sample-size=1 --snow-quorum-size=1 --staking-tls-enabled=false`. (For a production deployment, |
| 59 | + you may want to extend the docker image with required credentials for |
| 60 | + staking and TLS.) |
| 61 | + |
| 62 | +## Running Gecko and Creating a Local Test Network |
| 63 | + |
| 64 | +To create your own local test network, run: |
| 65 | + |
| 66 | +```sh |
| 67 | +./build/ava --public-ip=127.0.0.1 --snow-sample-size=1 --snow-quorum-size=1 --staking-tls-enabled=false |
| 68 | +``` |
| 69 | + |
| 70 | +This launches an AVA network with one node. |
| 71 | + |
| 72 | +You should see some pretty ASCII art and log messages. |
| 73 | +You may see a few warnings. These are OK. |
| 74 | + |
| 75 | +You can use `Ctrl + C` to kill the node. |
| 76 | + |
| 77 | +If you want to specify your log level. You should set `--log-level` to one of the following values, in decreasing order of logging. |
| 78 | +* `--log-level=verbo` |
| 79 | +* `--log-level=debug` |
| 80 | +* `--log-level=info` |
| 81 | +* `--log-level=warn` |
| 82 | +* `--log-level=error` |
| 83 | +* `--log-level=fatal` |
| 84 | +* `--log-level=off` |
0 commit comments