Deploy InfluxDB
In this step, we will deploy a new InfluxDB service in the Voltmetrix platform. We will use the Voltmetrix CLI to deploy a new service.
You can use the Voltmetrix CLI or the Voltmetrix API to deploy a new service. Download the CLI from here (Linux)
Introduction
The Voltmetrix platform offers two versions of InfluxDB: InfluxDB V1 and InfluxDB V2. Its important to know that both versions are different on how they work for a few things. Take a look at this doc to know more about the differences between both versions: InfluxDB V1 vs InfluxDB V2.
Once you decide which version of InfluxDB you want to use, you can deploy a new service using the Voltmetrix CLI or the Voltmetrix API. Lets see how to do it.
Deploy InfluxDB v1.8.10
To deploy a new InfluxDB V1 service, you need to run the following command, but before of that, you need to consider the following:
Size: The size of the instance that you want to deploy. You can see the available sizes here. Its important to size your instance according to your needs. If you need help with this, please contact us at [email protected].
Region: The region where you want to deploy your instance. You can see the available regions here. This is important because the region will affect the latency of your queries. You will want to deploy your instance in the region that is closer to your users.
Database: The database that you want to deploy. In this case, we want to deploy InfluxDB V1, so we need to use the
influxdbv1
slug.
Once we have this defined, we can deploy using the Voltmetrix CLI:
voltmetrix deploy \
--cloud aws \
--database influxdbv1 \
--org_id your-org_id \
--token your-awesome-token \
--size t2.small \
--region us-east-1
The response will be a JSON object with the following properties:
{
"cloud": "aws",
"resource_id": "5c9f5b5c",
"database": "influxdbv2",
"org_id": "your-org_id",
"size": "t2.small",
"region": "us-east-1",
"created_at": "2019-03-27T12:34:56.789Z",
"port": "port",
"url": "https://5c9f5b5c.customers.voltmetrix.io:8086",
"username": "admin",
"password": "changeme"
}
Is important to save the resource_id
because you will need it to, resize or delete the service and/or open a support ticket.
Change the default password
Once this is deployed we highly recommend to change the default password of the admin user. You can do this using the following command:
Using the InfluxDB API
curl -X POST "https://5c9f5b5c.customers.voltmetrix.io:8086/query?u=admin&p=changeme" \
--data-urlencode "q=SET PASSWORD FOR admin = 'your-new-password'"
Using the InfluxDB CLI
To reset the password using the InfluxDB CLI, you need to install InfluxDB. You can find the instructions here.
Once you have the CLI installed, you can run the following command:
influx -host 5c9f5b5c.customers.voltmetrix.io -port 8086 -username admin -password changeme
Once you are in the CLI, you can run the following command to change the password:
SET PASSWORD FOR admin = 'your-new-password'
Deploy InfluxDB v2.7
InfluxDB v2 is the following generation of InfluxDB OSS. It has a lot of new features and improvements. You can read more about it here.
To deploy a new InfluxDB V2 service, you need to run the following command, but before of that, you need to consider the following:
Size: The size of the instance that you want to deploy. You can see the available sizes here. Its important to size your instance according to your needs. If you need help with this, please contact us at [email protected].
Region: The region where you want to deploy your instance. You can see the available regions here. This is important because the region will affect the latency of your queries. You will want to deploy your instance in the region that is closer to your users.
Database: The database that you want to deploy. In this case, we want to deploy InfluxDB v2.7, so we need to use the
influxdbv2
slug.
Once we have this defined, we can deploy using the Voltmetrix CLI:
voltmetrix deploy \
--cloud aws \
--database influxdbv2 \
--org_id your-org_id \
--token your-awesome-token \
--size t2.small \
--region us-east-1",
The response will be a JSON object with the following properties:
{
"cloud": "aws",
"resource_id": "5c9f5b5c",
"database": "influxdbv2",
"org_id": "your-org_id",
"size": "t2.small",
"region": "us-east-1",
"created_at": "2019-03-27T12:34:56.789Z",
"port": "port",
"url": "https://5c9f5b5c.customers.voltmetrix.io:8086",
"username": "admin",
"password": "changeme"
}
Is important to save the resource_id
because you will need it to, resize or delete the service and/or open a support ticket.
Change the default password
Once this is deployed we highly recommend to change the default password of the admin user. You can do this using accesing the UI of InfluxDB v2.7 and going to the Data
section and then API Tokens
. Once there, you can create a new token and use it to change the password of the admin user.
Using the InfluxDB Cloud CLI
To reset the password using the InfluxDB CLI, you need to install it. You can find the instructions here.
Once you have the CLI installed, you can run the following command:
influx user password -n admin -p your-new-password -h 5c9f5b5c.customers.voltmetrix.io:8086 -t your-token
Conclusion
In this guide, we learned how to deploy InfluxDB v1 and v2 using the Voltmetrix CLI. We also learned how to change the default password of the admin user.
Now, we can continue with the next article to learn how to ingest data into InfluxDB.
If you have any questions, please contact us at [email protected].