Remove extra copies of geolite2 module (#91)
This commit is contained in:
1 parent
1e0de9e7ea
commit
333b53caf5
14 files changed
-244
No files matched your search
@@ -1,9 +0,0 @@
|
||||
# Geoip Terraform module for Fleet
|
||||
|
||||
This module adds Geoip data to the Fleet docker image for use with the Fleet Terraform module.
|
||||
|
||||
See the [documentation](https://fleetdm.com/docs/configuration/fleet-server-configuration#geoip) for some basic information about what happens under the hood.
|
||||
|
||||
You will need to supply a Maxmind license key and a destination docker registry (such as ECR) to hold the new image.
|
||||
|
||||
Outputs will be added to the environment variables in Fleet via the `extra_environment_variables` list.
|
||||
@@ -1 +0,0 @@
|
||||
header-from: .header.md
|
||||
@@ -1,15 +0,0 @@
|
||||
ARG FLEET_IMAGE
|
||||
|
||||
FROM ${FLEET_IMAGE}
|
||||
|
||||
ARG LICENSE_KEY
|
||||
USER root
|
||||
|
||||
RUN wget "https://github.com/osquery/osquery/releases/download/5.12.2/osquery-5.12.2_1.linux_x86_64.tar.gz" -O /tmp/osquery.tar.gz &&\
|
||||
[ "101b61d760d530be9e41165c858d40353e03412676824b9fb6847a9febaab853" == "$(sha256sum /tmp/osquery.tar.gz | awk '{ print $1 }')" ] &&\
|
||||
tar -xzvf /tmp/osquery.tar.gz -C / &&\
|
||||
rm /tmp/osquery.tar.gz
|
||||
|
||||
USER fleet
|
||||
# Might not be needed again, but keep it just in case
|
||||
CMD ["fleet", "serve"]
|
||||
@@ -1,48 +0,0 @@
|
||||
# Geoip Terraform module for Fleet
|
||||
|
||||
This module adds Geoip data to the Fleet docker image for use with the Fleet Terraform module.
|
||||
|
||||
See the [documentation](https://fleetdm.com/docs/configuration/fleet-server-configuration#geoip) for some basic information about what happens under the hood.
|
||||
|
||||
You will need to supply a Maxmind license key and a destination docker registry (such as ECR) to hold the new image.
|
||||
|
||||
Outputs will be added to the environment variables in Fleet via the `extra_environment_variables` list.
|
||||
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="requirement_docker"></a> [docker](#requirement\_docker) | 3.0.2 |
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_docker"></a> [docker](#provider\_docker) | 3.0.2 |
|
||||
| <a name="provider_local"></a> [local](#provider\_local) | 2.4.1 |
|
||||
|
||||
## Modules
|
||||
|
||||
No modules.
|
||||
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| [docker_image.maxmind_fleet](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs/resources/image) | resource |
|
||||
| [docker_registry_image.maxmind_fleet](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs/resources/registry_image) | resource |
|
||||
| [local_file.dockerfile](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|------|---------|:--------:|
|
||||
| <a name="input_destination_image"></a> [destination\_image](#input\_destination\_image) | n/a | `string` | n/a | yes |
|
||||
| <a name="input_fleet_image"></a> [fleet\_image](#input\_fleet\_image) | n/a | `string` | n/a | yes |
|
||||
| <a name="input_license_key"></a> [license\_key](#input\_license\_key) | n/a | `string` | n/a | yes |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| <a name="output_extra_environment_variables"></a> [extra\_environment\_variables](#output\_extra\_environment\_variables) | n/a |
|
||||
@@ -1,9 +0,0 @@
|
||||
# Geoip Terraform module for Fleet
|
||||
|
||||
This module adds Geoip data to the Fleet docker image for use with the Fleet Terraform module.
|
||||
|
||||
See the [documentation](https://fleetdm.com/docs/configuration/fleet-server-configuration#geoip) for some basic information about what happens under the hood.
|
||||
|
||||
You will need to supply a Maxmind license key and a destination docker registry (such as ECR) to hold the new image.
|
||||
|
||||
Outputs will be added to the environment variables in Fleet via the `extra_environment_variables` list.
|
||||
@@ -1 +0,0 @@
|
||||
header-from: .header.md
|
||||
@@ -1,17 +0,0 @@
|
||||
ARG FLEET_IMAGE
|
||||
|
||||
FROM ${FLEET_IMAGE}
|
||||
|
||||
ARG LICENSE_KEY
|
||||
USER root
|
||||
|
||||
RUN mkdir -p /opt/GeoLite2 && cd /opt/GeoLite2 &&\
|
||||
wget --max-redirect 10 "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${LICENSE_KEY}&suffix=tar.gz" -O GeoLite2-City.tar.gz &&\
|
||||
wget --max-redirect 10 "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${LICENSE_KEY}&suffix=tar.gz.sha256" -O GeoLite2-City.tar.gz.sha256 &&\
|
||||
[ "$(awk '{ print $1 }' GeoLite2-City.tar.gz.sha256)" == "$(sha256sum GeoLite2-City.tar.gz | awk '{ print $1 }')" ] &&\
|
||||
(tar -xzvf GeoLite2-City.tar.gz "*/GeoLite2-City.mmdb" --strip-components 1 2>/dev/null || true) &&\
|
||||
rm -f GeoLite2-City.tar.gz*
|
||||
|
||||
USER fleet
|
||||
# Might not be needed again, but keep it just in case
|
||||
CMD ["fleet", "serve"]
|
||||
@@ -1,48 +0,0 @@
|
||||
# Geoip Terraform module for Fleet
|
||||
|
||||
This module adds Geoip data to the Fleet docker image for use with the Fleet Terraform module.
|
||||
|
||||
See the [documentation](https://fleetdm.com/docs/configuration/fleet-server-configuration#geoip) for some basic information about what happens under the hood.
|
||||
|
||||
You will need to supply a Maxmind license key and a destination docker registry (such as ECR) to hold the new image.
|
||||
|
||||
Outputs will be added to the environment variables in Fleet via the `extra_environment_variables` list.
|
||||
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="requirement_docker"></a> [docker](#requirement\_docker) | 3.0.2 |
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_docker"></a> [docker](#provider\_docker) | 3.0.2 |
|
||||
| <a name="provider_local"></a> [local](#provider\_local) | 2.4.1 |
|
||||
|
||||
## Modules
|
||||
|
||||
No modules.
|
||||
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| [docker_image.maxmind_fleet](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs/resources/image) | resource |
|
||||
| [docker_registry_image.maxmind_fleet](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs/resources/registry_image) | resource |
|
||||
| [local_file.dockerfile](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|------|---------|:--------:|
|
||||
| <a name="input_destination_image"></a> [destination\_image](#input\_destination\_image) | n/a | `string` | n/a | yes |
|
||||
| <a name="input_fleet_image"></a> [fleet\_image](#input\_fleet\_image) | n/a | `string` | n/a | yes |
|
||||
| <a name="input_license_key"></a> [license\_key](#input\_license\_key) | n/a | `string` | n/a | yes |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| <a name="output_extra_environment_variables"></a> [extra\_environment\_variables](#output\_extra\_environment\_variables) | n/a |
|
||||
@@ -1,32 +0,0 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "3.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Build the new image
|
||||
resource "docker_image" "maxmind_fleet" {
|
||||
name = var.destination_image
|
||||
|
||||
build {
|
||||
context = path.module
|
||||
platform = "linux/amd64"
|
||||
build_args = {
|
||||
FLEET_IMAGE = var.fleet_image
|
||||
LICENSE_KEY = var.license_key
|
||||
}
|
||||
pull_parent = true
|
||||
}
|
||||
}
|
||||
|
||||
# push it to the specified repo
|
||||
resource "docker_registry_image" "maxmind_fleet" {
|
||||
triggers = {
|
||||
fleet_digest = docker_image.maxmind_fleet.repo_digest
|
||||
}
|
||||
name = docker_image.maxmind_fleet.name
|
||||
keep_remotely = true
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
output "extra_environment_variables" {
|
||||
value = {
|
||||
FLEET_GEOIP_DATABASE_PATH = "/opt/GeoLite2/GeoLite2-City.mmdb"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
variable "fleet_image" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "destination_image" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "license_key" {
|
||||
type = string
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "3.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Build the new image
|
||||
resource "docker_image" "maxmind_fleet" {
|
||||
name = var.destination_image
|
||||
|
||||
build {
|
||||
context = path.module
|
||||
platform = "linux/amd64"
|
||||
build_args = {
|
||||
FLEET_IMAGE = var.fleet_image
|
||||
LICENSE_KEY = var.license_key
|
||||
}
|
||||
pull_parent = true
|
||||
}
|
||||
}
|
||||
|
||||
# push it to the specified repo
|
||||
resource "docker_registry_image" "maxmind_fleet" {
|
||||
triggers = {
|
||||
fleet_digest = docker_image.maxmind_fleet.repo_digest
|
||||
}
|
||||
name = docker_image.maxmind_fleet.name
|
||||
keep_remotely = true
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
output "extra_environment_variables" {
|
||||
value = {
|
||||
FLEET_GEOIP_DATABASE_PATH = "/opt/GeoLite2/GeoLite2-City.mmdb"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
variable "fleet_image" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "destination_image" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "license_key" {
|
||||
type = string
|
||||
}
|
||||
Reference in new issue
Block a user