Last active
February 13, 2020 11:21
-
-
Save techgaun/c2802fb94ba36852690b74ea175faf09 to your computer and use it in GitHub Desktop.
Revisions
-
techgaun revised this gist
Mar 22, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Once you have created necessary users, you can re-enable the authentication. You ```shell /etc/init.d/influxdb stop sed -i "s/# auth-enabled = false/auth-enabled = true/" /etc/influxdb/influxdb.conf /etc/init.d/influxdb start ``` -
techgaun revised this gist
Mar 22, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,8 +61,8 @@ cp /etc/influxdb/influxdb.conf{,-bak} sed -i s./var/lib/influxdb/meta./opt/influx/data/meta. /etc/influxdb/influxdb.conf sed -i s./var/lib/influxdb/data./opt/influx/data/data. /etc/influxdb/influxdb.conf sed -i s./var/lib/influxdb/wal./opt/influx/wal. /etc/influxdb/influxdb.conf sed -i 's,# https-certificate = "/etc/ssl/influxdb.pem",https-certificate = "/opt/influx/ssl/bundle.pem",' /etc/influxdb/influxdb.conf sed -i "s/# https-enabled = false/https-enabled = true/" /etc/influxdb/influxdb.conf ``` ##### Authentication configuration -
techgaun revised this gist
Mar 22, 2017 . 1 changed file with 15 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ *Last updated: 2017-03-22 : Update to 1.2.2* The following assumes you're executing as a root user #### Pre-install @@ -11,17 +13,27 @@ mkdir -p /opt/influx/{wal,data,ssl} #### WAL and Data volumes ```shell # devices maybe different for you so adjust accordingly mkfs.ext4 /dev/sdb mkfs.ext4 /dev/sdc mount /dev/sdb /opt/influx/wal/ mount /dev/sdc /opt/influx/data/ ``` #### Permanent mounts via fstab ```shell # it may look something like this so your devices are mounted across restarts /dev/sdb /opt/influx/wal ext4 defaults,nofail 0 2 /dev/sdc /opt/influx/data ext4 defaults,nofail 0 2 ``` #### Install ```shell wget https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2.x86_64.rpm yum localinstall influxdb-1.2.2.x86_64.rpm chkconfig influxdb on ``` -
techgaun revised this gist
Dec 13, 2016 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ *Last updated: 2016-12-13 : Update to 1.1.1* #### Pre-install ```shell @@ -18,8 +20,8 @@ mount /dev/sdc /opt/influx/data/ #### Install ```shell wget https://dl.influxdata.com/influxdb/releases/influxdb-1.1.1.x86_64.rpm sudo yum localinstall influxdb-1.1.1.x86_64.rpm chkconfig influxdb on ``` -
techgaun revised this gist
Oct 17, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,8 @@ mount /dev/sdc /opt/influx/data/ #### Install ```shell wget https://dl.influxdata.com/influxdb/releases/influxdb-1.0.2.x86_64.rpm yum localinstall influxdb-1.0.2.x86_64.rpm chkconfig influxdb on ``` -
techgaun revised this gist
Jul 28, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,6 +48,7 @@ sed -i s./var/lib/influxdb/meta./opt/influx/data/meta. /etc/influxdb/influxdb.co sed -i s./var/lib/influxdb/data./opt/influx/data/data. /etc/influxdb/influxdb.conf sed -i s./var/lib/influxdb/wal./opt/influx/wal. /etc/influxdb/influxdb.conf sed -i s,/etc/ssl/influxdb.pem,/opt/influx/ssl/bundle.pem, /etc/influxdb/influxdb.conf sed -i "s/https-enabled = false/https-enabled = true/" /etc/influxdb/influxdb.conf ``` ##### Authentication configuration @@ -70,7 +71,6 @@ Once you have created necessary users, you can re-enable the authentication. You ```shell /etc/init.d/influxdb stop sed -i "s/auth-enabled = false/auth-enabled = true/" /etc/influxdb/influxdb.conf /etc/init.d/influxdb start ``` -
techgaun revised this gist
Jul 28, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ mount /dev/sdc /opt/influx/data/ ```shell wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.x86_64.rpm yum localinstall influxdb-0.13.0.x86_64.rpm chkconfig influxdb on ``` -
techgaun revised this gist
Jul 27, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,7 @@ Once you have created necessary users, you can re-enable the authentication. You ```shell /etc/init.d/influxdb stop sed -i "s/auth-enabled = false/auth-enabled = true/" /etc/influxdb/influxdb.conf sed -i "s/https-enabled = false/https-enabled = true/" /etc/influxdb/influxdb.conf /etc/init.d/influxdb start ``` -
techgaun created this gist
Jul 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,75 @@ #### Pre-install ```shell yum update yum install -y git mkdir -p /opt/influx/{wal,data,ssl} ``` #### WAL and Data volumes ```shell mkfs.ext4 /dev/sdb mkfs.ext4 /dev/sdc mount /dev/sdb /opt/influx/wal/ mount /dev/sdc /opt/influx/data/ ``` #### Install ```shell wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.x86_64.rpm chkconfig influxdb on ``` #### Configuration ##### SSL First, you need to download the certificate bundle on the influxdb host. Below is an example of sending from your local system. ```shell # on your local # scp the cert or download # your cert needs to be bundle that combines the private key, your crt and certificate chain # do so with something like below cat privkey.pem mysite.crt mysite-ca-bundle.crt > bundle.pem scp bundle.pem root@myhost:/tmp ``` Now, on the influx host, you can configure influxdb config ```shell mv /tmp/bundle.pem /opt/influx/ssl/ chown -R influxdb:influxdb /opt/influx/ cp /etc/influxdb/influxdb.conf{,-bak} sed -i s./var/lib/influxdb/meta./opt/influx/data/meta. /etc/influxdb/influxdb.conf sed -i s./var/lib/influxdb/data./opt/influx/data/data. /etc/influxdb/influxdb.conf sed -i s./var/lib/influxdb/wal./opt/influx/wal. /etc/influxdb/influxdb.conf sed -i s,/etc/ssl/influxdb.pem,/opt/influx/ssl/bundle.pem, /etc/influxdb/influxdb.conf ``` ##### Authentication configuration ```shell /etc/init.d/influxdb start # start with auth-enabled = false ``` Now, connect to the influxdb and configure the users. We'll configure one admin user and one non-admin user. ```shell influx > create user superadmin with password 'my_password' with all privileges > create user nonadmin with password 'na_password' > grant all on tsdb_stage to nonadmin > grant READ on tsdb_prod to nonadmin > grant WRITE on tsdb_dev to nonadmin ``` Once you have created necessary users, you can re-enable the authentication. You could have chosen to just create admin user first and then create non-admin users after enabling authentication to reduce the window of keeping your influxdb wide open. ```shell /etc/init.d/influxdb stop sed -i "s/auth-enabled = false/auth-enabled = true/" /etc/influxdb/influxdb.conf /etc/init.d/influxdb start ``` That should be all for getting the influxdb up and running on Amazon Linux.