-
Notifications
You must be signed in to change notification settings - Fork 244
Configuring S3 with Utilization API (Utapi)
git clone [email protected]:scality/S3.git
Install dependencies using
npm install
This will install Utapi
as well.
Note: Please make sure you have the latest 4.x node.js version
Utapi uses Redis as datastore. Redis can be installed using various methods from here.
If you are an OS X user and have homebrew installed on your computer, you can do
brew install redis
Redis is also available as a docker container. If you have docker installed, you can run
docker pull redis
or start a redis container from Kitematic.
After successfully installing Redis, the next step would be adding the config to S3. The default host is 127.0.0.1
and port is 6379
, but this may change depending on your installation.
Please add the following config in S3's config.json
located in S3's root folder.
"utapi": {
"workers": 1,
"port": 8000,
"redis": {
"host": "127.0.01",
"port": 6379
}
}
If you locally installed Redis, it can be started using
$./redis-server
Or start the Redis container if you are using Docker or Kitematic.
Utapi works with both file and memory backends. To start S3 with
- memory backend
```
npm run mem_backend
```
- file backend
npm start
```
Once S3 Server is up, any successful requests are recorded by Utapi in Redis automatically.
## Start Utapi Server
To make requests and receive utilization metrics from Utapi, Utapi Server needs to be started. Since it's a dependency of S3, it comes preinstalled. The server can be started by running the command
npm run start_utapi
For additional notes on how to make requests to Utapi, please refer to the wiki [here](https://github.com/scality/utapi/wiki/Listing-Metrics-with-Utapi).