🏡 index : github.com/captn3m0/nebula.git

author Nemo <me@captnemo.in> 2018-05-29 18:06:21.0 +05:30:00
committer Nemo <me@captnemo.in> 2018-05-29 18:06:21.0 +05:30:00
commit
8efb575290c3505b12606d1804a43781211ea06c [patch]
tree
d20a59fa74ca5415c8e8e26b88f2e0c468c193da
parent
66ae57a3c5ebd250a353f63703e1a9c73205e281
download
8efb575290c3505b12606d1804a43781211ea06c.tar.gz

Upgrades and stuff



Diff

 providers.tf           |  2 +-
 _scripts/ubooquity.php |  5 +++++
 docker/data.tf         |  2 +-
 docker/got.tf          | 42 +++++++++++++++++++++++++++++++-----------
 docker/network.tf      |  1 +
 mysql/airsonic.tf      | 16 ++++++++++++++++
 mysql/lychee.tf        | 16 ++++++++++++++++
 mysql/main.tf          | 33 ---------------------------------
 8 files changed, 63 insertions(+), 54 deletions(-)

diff --git a/providers.tf b/providers.tf
index 428bd6d..39a8f54 100644
--- a/providers.tf
+++ a/providers.tf
@@ -14,6 +14,6 @@
  password = "${var.mysql_root_password}"
}

provider digitalocean {

provider "digitalocean" {

  token = "${var.digitalocean-token}"
}
diff --git a/_scripts/ubooquity.php b/_scripts/ubooquity.php
new file mode 100644
index 0000000..4f6049e 100644
--- /dev/null
+++ a/_scripts/ubooquity.php
@@ -1,0 +1,5 @@
<?php

// Generates the Ubooquity preferences.json file

$template = "ubooquity.tpl.json";
diff --git a/docker/data.tf b/docker/data.tf
index 379544f..28eaecf 100644
--- a/docker/data.tf
+++ a/docker/data.tf
@@ -11,7 +11,7 @@
data "docker_registry_image" "traefik" {

  # Critical and I like upgrading it
  # for updating config for new features
  name = "traefik:1.6.0-rc5-alpine"
  name = "traefik:1.6-alpine"
}

# YOLO everything else
diff --git a/docker/got.tf b/docker/got.tf
index b047a6c..aa9a553 100644
--- a/docker/got.tf
+++ a/docker/got.tf
@@ -1,23 +1,27 @@
data "docker_registry_image" "gotviz" {

  name = "tocttou/gotviz:latest"
}

resource "docker_image" "gotviz" {

  name          = "${data.docker_registry_image.gotviz.name}"
  pull_triggers = ["${data.docker_registry_image.gotviz.sha256_digest}"]
}

resource "docker_container" "gotviz" {

  name  = "gotviz"
  image = "${docker_image.gotviz.latest}"

  labels = "${merge(

    local.traefik_common_labels, map(
      "traefik.port", 8080,
      "traefik.frontend.rule","Host:got-relationships.${var.domain}"
  ))}"

  restart               = "unless-stopped"
  destroy_grace_seconds = 60
  must_run              = true
}
# resource "docker_image" "gotviz" {
#   name          = "${data.docker_registry_image.gotviz.name}"
#   pull_triggers = ["${data.docker_registry_image.gotviz.sha256_digest}"]
# }


# resource "docker_container" "gotviz" {
#   name  = "gotviz"
#   image = "${docker_image.gotviz.latest}"


#   labels = "${merge(
#     local.traefik_common_labels, map(
#       "traefik.port", 8080,
#       "traefik.frontend.rule","Host:got-relationships.${var.domain}"
#   ))}"


#   restart               = "unless-stopped"
#   destroy_grace_seconds = 60
#   must_run              = true
# }

diff --git a/docker/network.tf b/docker/network.tf
new file mode 100644
index 0000000..8b13789 100644
--- /dev/null
+++ a/docker/network.tf
@@ -1,0 +1,1 @@

diff --git a/mysql/airsonic.tf b/mysql/airsonic.tf
new file mode 100644
index 0000000..c1515e9 100644
--- /dev/null
+++ a/mysql/airsonic.tf
@@ -1,0 +1,16 @@
resource "mysql_database" "airsonic" {

  name = "airsonic"
}

resource "mysql_user" "airsonic" {

  user               = "airsonic"
  host               = "%"
  plaintext_password = "${var.mysql_airsonic_password}"
}

resource "mysql_grant" "airsonic" {

  user       = "${mysql_user.airsonic.user}"
  host       = "${mysql_user.airsonic.host}"
  database   = "${mysql_database.airsonic.name}"
  privileges = ["ALL"]
}
diff --git a/mysql/lychee.tf b/mysql/lychee.tf
new file mode 100644
index 0000000..dfc9744 100644
--- /dev/null
+++ a/mysql/lychee.tf
@@ -1,0 +1,16 @@
resource "mysql_database" "lychee" {

  name = "lychee"
}

resource "mysql_user" "lychee" {

  user               = "lychee"
  host               = "%"
  plaintext_password = "${var.mysql_lychee_password}"
}

resource "mysql_grant" "lychee" {

  user       = "${mysql_user.lychee.user}"
  host       = "${mysql_user.lychee.host}"
  database   = "${mysql_database.lychee.name}"
  privileges = ["ALL"]
}
diff --git a/mysql/main.tf b/mysql/main.tf
deleted file mode 100644
index d3e0200..0000000 100644
--- a/mysql/main.tf
+++ /dev/null
@@ -1,33 +1,0 @@
resource "mysql_database" "lychee" {

  name = "lychee"
}

resource "mysql_user" "lychee" {

  user               = "lychee"
  host               = "%"
  plaintext_password = "${var.mysql_lychee_password}"
}

resource "mysql_grant" "lychee" {

  user       = "${mysql_user.lychee.user}"
  host       = "${mysql_user.lychee.host}"
  database   = "${mysql_database.lychee.name}"
  privileges = ["ALL"]
}

resource "mysql_database" "airsonic" {

  name = "airsonic"
}

resource "mysql_user" "airsonic" {

  user               = "airsonic"
  host               = "%"
  plaintext_password = "${var.mysql_airsonic_password}"
}

resource "mysql_grant" "airsonic" {

  user       = "${mysql_user.airsonic.user}"
  host       = "${mysql_user.airsonic.host}"
  database   = "${mysql_database.airsonic.name}"
  privileges = ["ALL"]
}