dda-devops-build/doc/architecture/BuildAndMixins.md

99 lines
2.4 KiB
Markdown
Raw Normal View History

2023-04-14 15:15:17 +00:00
# Overview of Build and Mixins
* Build can be used standalone
* Mixin can be added to Build
2023-03-12 15:55:15 +00:00
```mermaid
classDiagram
class DevopsBuild {
name()
build_path()
initialize_build_dir()
}
2023-04-14 15:15:17 +00:00
2023-03-12 15:55:15 +00:00
class DevopsTerraformBuild {
terraform_build_commons_path()
project_vars()
copy_build_resource_file_from_package(name)
copy_build_resources_from_package()
copy_build_resources_from_dir()
initialize_build_dir()
post_build()
read_output_json()
plan()
plan_fail_on_diff()
apply(auto_approve=False)
refresh()
destroy(auto_approve=False)
tf_import(tf_import_name, tf_import_resource,)
print_terraform_command(terraform)
}
class HetznerMixin {
// HetznerMixin -> HetznerTerraformBuild
project_vars()
copy_build_resources_from_package()
}
class ExoscaleMixin {
// ExoscaleMixin -> ExoscaleTerraformBuild
project_vars()
copy_build_resources_from_package()
}
class AwsBackendPropertiesMixin {
def project_vars()
copy_build_resources_from_package()
}
class DigitaloceanBackendPropertiesMixin {
project_vars(self)
copy_build_resources_from_package(self)
}
class DevopsImageBuild {
2023-03-12 15:55:15 +00:00
def initialize_build_dir()
image()
drun()
dockerhub_login()
dockerhub_publish()
test()
}
2023-04-14 15:15:17 +00:00
class ReleaseMixin {
prepare_release()
tag_and_push_release()
}
class ProvsK3sBuild {
// ProvsK3sBuild -> ProvsK3sBuild
2023-03-12 15:55:15 +00:00
def update_runtime_config(fqdn, ipv4, ipv6=None)
write_provs_config()
provs_apply(dry_run=False)
}
class C4kMixin {
2023-03-14 14:07:47 +00:00
// C4kMixin -> C4k
2023-03-12 15:55:15 +00:00
def write_c4k_config()
def write_c4k_auth()
c4k_apply(dry_run=False)
}
DevopsBuild <|-- DevopsImageBuild
2023-03-12 15:55:15 +00:00
DevopsBuild <|-- DevopsTerraformBuild
DevopsBuild <|-- AwsRdsPgMixin
2023-04-14 15:15:17 +00:00
DevopsBuild <|-- ReleaseMixin
2023-03-12 15:55:15 +00:00
DevopsTerraformBuild <|-- AwsBackendPropertiesMixin
DevopsTerraformBuild <|-- DigitaloceanTerraformBuild
DevopsTerraformBuild <|--ExoscaleMixin
DevopsTerraformBuild <|--HetznerMixin
DevopsBuild <|-- ProvsK3sBuild
2023-03-12 15:55:15 +00:00
DigitaloceanTerraformBuild <|-- DigitaloceanBackendPropertiesMixin
AwsBackendPropertiesMixin <|-- AwsMfaMixin
DevopsBuild <|-- C4kMixin
```