AWS using Ansible? Yes, it's possible!

  Although, I've used Ansible extensively for a lot of automation and orchestration tasks, using Ansible for AWS was indeed, a new territory for me.  This turned out to be a blessing, since along with using Ansible for AWS tasks, I also learnt how to use WSL (Windows Subsystem for Linux) on a Windows machine. Though WSL's been around for some time, I still hadn't come around to using it since I was mostly using my Macbook pro. Not anymore, though!  Anyway, I have listed below the steps to: Install WSL on Windows 11 23H2 patch Install AWS CLI on Ubuntu 22.04 (Exact version - 22.04.3 LTS) Install Ansible and the amazon.aws collection Use AWS CLI to get the list of  VPCs in the region - us-east-1 (or a region of your choice) Create a python file/script to get the list of VPCs in the region - us-east-1 (or a region of your choice) Create an Ansible playbook to get the list of VPCs in the region - us-east-1 (or a region of your choice.   You may download the complete installat

Grafana and Oracle database - Part 2B - Influx CLI, Influx DB and measurements

The next logical step is to get ourselves familiar with the influx CLI, create a brand new DB and a separate user with all privileges on that database.

First, login to influx CLI and create an admin user. If you don't, Influx DB won't allow you to perform any query before doing so.

NOTE: You may also substitute the actual hostname in place of localhost.

$ influx -host localhost -port 8086
Connected to http://localhost:8086 version 1.5.5
InfluxDB shell version: 1.5.5
 

> show databases
ERR: error authorizing query: create admin user first or disable authentication
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
 

> use _internal
ERR: error authorizing query: create admin user first or disable authentication
DB does not exist!
 

> create user admin with password 'Welcome4321' with all privileges;
 

> auth
username: admin
password:
 

> show databases;
name: databases
name
----
_internal


Now, create your first database and switch to that one.

> show databases;
name: databases
name
----
_internal
 

> create database telegraf;
 

> show databases
name: databases
name
----
_internal
telegraf
 

> use telegraf
Using database telegraf


Now, this database is ready to accept data from telegraf. Of course, let's set the retention policy on this data since we don't want to overwhelm the database.

Read more about retention policies here.

> show retention policies
name    duration shardGroupDuration replicaN default
----    -------- ------------------ -------- -------
autogen 0s       168h0m0s           1        true 
 

> create retention policy "one_week" on "telegraf" duration 1w replication 1 default
 

> show retention policies
name     duration shardGroupDuration replicaN default
----     -------- ------------------ -------- -------
autogen  0s       168h0m0s           1        false
one_week 168h0m0s 24h0m0s            1        true

 

Now, create a user with privileges only on the newly created "telegraf" database.

> create user telegraf_user with password 'Telegraf4321'

> show users
user          admin
----          -----
admin         true
telegraf_user false

> grant all privileges on telegraf to telegraf_user

> show grants for telegraf_user

database privilege
-------- ---------
telegraf ALL PRIVILEGES


Read more about introduction to measurements here.

Let's proceed to install Telegraf agent, without further ado.


< Prev (Part 2A: Install Influx DB)                                                   Next (Part 3: Install Telegraf agent) >

Comments

Popular posts from this blog

Solution to "End Program - WMS Idle"

Modify retention period of workflow queues

Check if UTL_FILE and FND_FILE are working fine