Skip to content

Sync salt packages for a specific salt version from the upstream salt repo to your own S3 bucket

License

Notifications You must be signed in to change notification settings

plus3it/salt-reposync

Repository files navigation

salt-reposync

Pull salt packages for specific salt versions from an s3-hosted yum repo and push them to S3.

Usage

terraform init
terraform plan -var bucket_name=<BUCKET> -var salt_versions='["SALT_VERSION"]' -out tfplan
terraform apply -var bucket_name=<BUCKET> -var salt_versions='["SALT_VERSION"]' tfplan

Prerequisites

  1. An AWS credential with get/put permissions to the S3 bucket must be pre- configured. Any method supported by the aws CLI may be used to configure the credential.
  2. rclone >= 1.57.0 must be installed and available and in the PATH.

Testing

At the moment, testing is manual:

make rclone/install

# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx 
make terraform/pytest PYTEST_ARGS="-v --nomock"

Submodules

  • repo - Uses rclone to create a copy of the salt yum repo for the salt versions specified by var.salt_versions.

  • defs - Creates yum repo definition files for all var.salt_versions in the S3 bucket specified by var.bucket_name.

Requirements

No requirements.

Providers

No providers.

Resources

No resources.

Inputs

Name Description Type Default Required
bucket_name S3 bucket where salt repo will be mirrored string n/a yes
repo_endpoint HTTP/S endpoint URL that hosts the yum repos; used with the baseurl in the yum .repo definitions string n/a yes
repos Schema list of repo objects. repo_prefix is the S3 key prefix where the repo will be mirrored. salt_s3_bucket is the name of s3 bucket; typically "s3" when using a cloudfront endpoint. salt_s3_endpoint is the upstream s3 endpoint hosting the repos. salt_versions is the list of salt versions to mirror. yum_prefix is the S3 key prefix for the yum repo definition files.
list(object({
repo_prefix = string
salt_s3_bucket = string
salt_s3_endpoint = string
salt_versions = list(string)
yum_prefix = string
}))
n/a yes

Outputs

No outputs.

About

Sync salt packages for a specific salt version from the upstream salt repo to your own S3 bucket

Resources

License

Stars

Watchers

Forks

Packages

No packages published