This document is complementary to Getting Started providing yet another example of running non-containerized AIS locally.
Intended audience includes developers and first-time users, including those who'd never used Go before.
There's a truckload of tutorials and markdowns but the gist of it is very simple: you need to have $GOPATH
.
Secondly, $GOPATH/bin
must be in your $PATH
. Something like:
$ export PATH=$GOPATH/bin:$PATH
The intuition behind that is very simple: $GOPATH
defines location for:
- Go sources
- Go packages
- Go binaries
Yes, all of the above, and respectively: $GOPATH/src
, $GOPATH/pkg
, and $GOPATH/bin
.
And so, since you'd likely want to run binaries produced out of Go sources, you need to add the path, etc.
--- a/deploy/dev/local/aisnode_config.sh
+++ b/deploy/dev/local/aisnode_config.sh
@@ -167,7 +167,8 @@ cat > $AIS_LOCAL_CONF_FILE <<EOL
"port_intra_data": "${PORT_INTRA_DATA:-10080}"
},
"fspaths": {
- $AIS_FS_PATHS
+ "/sda/ais": {},
+ "/sdb/ais": {}
},
"test_fspaths": {
"root": "${TEST_FSPATH_ROOT:-/tmp/ais$NEXT_TIER/}",
Note that we are still running everything locally.
Therefore: remove the previously generated configuration (if any) and redeploy from scratch a minimal cluster consisting of a single gateway and a single target:
$ deploy/scripts/clean_deploy.sh --target-cnt 1 --proxy-cnt 1 --mountpath-cnt 0 --deployment local --remote-alias remais --gcp --aws
# or, same:
$ make kill clean cli deploy <<< $'1\n1\n0\ny\ny\nn\nn\n0\n'
The result will looks something like:
$ make kill clean cli deploy <<< $'1\n1\n0\ny\ny\nn\nn\n0\n'
Warning: missing CLI (ais) executable for proper graceful shutdown
Cleaning... done.
Enter number of storage targets:
Enter number of proxies (gateways):
Number of local mountpaths (enter 0 for preconfigured filesystems):
Select backend providers:
Amazon S3: (y/n) ?
Google Cloud Storage: (y/n) ?
Azure: (y/n) ?
HDFS: (y/n) ?
Loopback device size, e.g. 10G, 100M. Note that creating loopbacks may take a while, press Enter to skip:
Building aisnode: version=100676b29 providers= aws gcp tags= aws gcp debug mono
done.
Listening on port: 8080
$ make aisloader
$ aisloader -bucket=ais://abc -duration 2m -numworkers=8 -minsize=1K -maxsize=1K -pctput=100 --cleanup=false
Step 4: run iostat (or use any of the multiple documented ways to monitor AIS performance)
$ iostat -dxm 10 sda sdb
The drives
/dev/sda
and/dev/sdb
(and the mountpoints/sda
and/sdb
) are used here purely for illustrative purposes. And the two mountpaths,/sda/ais
and/sdb/ais
, could, of course, also be named differently.