2.5 KiB
2.5 KiB
Overview of Build and Mixins
- Build can be used standalone
- Mixin can be added to Build
classDiagram
class DevopsBuild {
name()
build_path()
initialize_build_dir()
}
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()
copy_local_state()
rescue_local_state()
initialize_build_dir()
post_build()
init_client()
write_output(terraform)
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()
init_client()
}
class DigitaloceanBackendPropertiesMixin {
project_vars(self)
copy_build_resources_from_package(self)
init_client(self)
}
class DevopsImageBuild {
def initialize_build_dir()
image()
drun()
dockerhub_login()
dockerhub_publish()
test()
}
class ReleaseMixin {
prepare_release()
tag_and_push_release()
}
class ProvsK3sMixin {
// ProvsK3sMixin -> ProvsK3sBuild
def update_runtime_config(fqdn, ipv4, ipv6=None)
write_provs_config()
provs_apply(dry_run=False)
}
class C4kMixin {
// C4kMixin -> C4k
def write_c4k_config()
def write_c4k_auth()
c4k_apply(dry_run=False)
}
DevopsBuild <|-- DevopsImageBuild
DevopsBuild <|-- DevopsTerraformBuild
DevopsBuild <|-- AwsRdsPgMixin
DevopsBuild <|-- ReleaseMixin
DevopsTerraformBuild <|-- AwsBackendPropertiesMixin
DevopsTerraformBuild <|-- DigitaloceanTerraformBuild
DevopsTerraformBuild <|--ExoscaleMixin
DevopsTerraformBuild <|--HetznerMixin
DevopsBuild <|-- ProvsK3sMixin
DigitaloceanTerraformBuild <|-- DigitaloceanBackendPropertiesMixin
AwsBackendPropertiesMixin <|-- AwsMfaMixin
DevopsBuild <|-- C4kMixin