mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-22 20:24:32 +07:00
refactor(external): remove Backblaze B2
Will add AWS S3 Glacier later
This commit is contained in:
parent
3ed8fe21dc
commit
6ea9b471fd
@ -13,8 +13,8 @@ Below is a list of external resources and why we need them (also see some [alter
|
||||
- DNS
|
||||
- DNS-01 challenge for Let's Encrypt
|
||||
- Tunnel to public services to the internet without port-forwarding
|
||||
- Backblaze:
|
||||
- B2 storage with S3 compatible API for offsite backup
|
||||
- AWS:
|
||||
- S3 Glacier for offsite backup
|
||||
|
||||
This layer will:
|
||||
|
||||
@ -50,15 +50,9 @@ Client IP Address Filtering
|
||||
└── Is in - 117.xxx.xxx.xxx, 2402:xxx:xxx:xxx:xxx:xxx:xxx:xxx
|
||||
```
|
||||
|
||||
### Create Backblaze API key
|
||||
### Create AWS API key
|
||||
|
||||
<https://secure.backblaze.com/app_keys.htm>
|
||||
|
||||
```
|
||||
Name of Key: Homelab
|
||||
Allow access to Bucket(s): All
|
||||
Type of Access: Read and Write
|
||||
```
|
||||
TODO
|
||||
|
||||
## Deploy
|
||||
|
||||
@ -72,4 +66,4 @@ make
|
||||
|
||||
- Terraform Cloud: any other [Terraform backends](https://www.terraform.io/language/settings/backends)
|
||||
- Cloudflare Tunnel: you can build a small VPS in the cloud and route traffic via it using Wireguard and HAProxy.
|
||||
- Backblaze B2: any S3 compatible object storage, such as S3 Glacier, Minio...
|
||||
- S3 Glacier: any S3 compatible object storage, such as Backblaze B2, Minio...
|
||||
|
@ -1,22 +0,0 @@
|
||||
resource "b2_bucket" "backup" {
|
||||
bucket_name = "khuedoan-homelab-backup"
|
||||
bucket_type = "allPrivate"
|
||||
}
|
||||
|
||||
resource "random_password" "backup_repo_password" {
|
||||
length = 64
|
||||
special = false
|
||||
}
|
||||
|
||||
resource "kubernetes_secret" "backblaze_credentials" {
|
||||
metadata {
|
||||
name = "backblaze-credentials"
|
||||
namespace = "k8up-operator"
|
||||
}
|
||||
|
||||
data = {
|
||||
"application-key-id" = var.b2_application_key_id
|
||||
"application-key" = var.b2_application_key
|
||||
"repo-password" = random_password.backup_repo_password.result
|
||||
}
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
cloudflare_email = "{{ cloudflare_email }}"
|
||||
cloudflare_api_key = "{{ cloudflare_api_key }}"
|
||||
cloudflare_account_id = "{{ cloudflare_account_id }}"
|
||||
b2_application_key_id = "{{ b2_application_key_id }}"
|
||||
b2_application_key = "{{ b2_application_key }}"
|
||||
|
@ -9,11 +9,6 @@
|
||||
- name: cloudflare_account_id
|
||||
prompt: Enter Cloudflare account ID
|
||||
private: false
|
||||
- name: b2_application_key_id
|
||||
prompt: Enter Backblaze application key ID
|
||||
private: false
|
||||
- name: b2_application_key
|
||||
prompt: Enter Backblaze application key (sensitive)
|
||||
tasks:
|
||||
- name: Render environment file
|
||||
template:
|
||||
|
@ -10,12 +10,3 @@ variable "cloudflare_api_key" {
|
||||
variable "cloudflare_account_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "b2_application_key_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "b2_application_key" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
@ -16,11 +16,6 @@ terraform {
|
||||
version = "~> 3.8.0"
|
||||
}
|
||||
|
||||
b2 = {
|
||||
source = "Backblaze/b2"
|
||||
version = "~> 0.7.0"
|
||||
}
|
||||
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "~> 2.7.0"
|
||||
@ -38,11 +33,6 @@ provider "cloudflare" {
|
||||
api_key = var.cloudflare_api_key
|
||||
}
|
||||
|
||||
provider "b2" {
|
||||
application_key_id = var.b2_application_key_id
|
||||
application_key = var.b2_application_key
|
||||
}
|
||||
|
||||
provider "kubernetes" {
|
||||
# Use KUBE_CONFIG_PATH environment variables
|
||||
# Or in cluster service account
|
||||
|
Loading…
Reference in New Issue
Block a user