https://github.com/plus3it/salt-reposync
Sync salt packages for a specific salt version from the upstream salt repo to your own S3 bucket
https://github.com/plus3it/salt-reposync
Last synced: about 1 year ago
JSON representation
Sync salt packages for a specific salt version from the upstream salt repo to your own S3 bucket
- Host: GitHub
- URL: https://github.com/plus3it/salt-reposync
- Owner: plus3it
- License: apache-2.0
- Created: 2016-12-28T12:29:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T04:49:10.000Z (over 1 year ago)
- Last Synced: 2025-01-21T23:17:48.808Z (over 1 year ago)
- Language: HCL
- Homepage:
- Size: 242 KB
- Stars: 1
- Watchers: 9
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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= -var salt_versions='["SALT_VERSION"]' -out tfplan
terraform apply -var bucket_name= -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](#input\_bucket\_name) | S3 bucket where salt repo will be mirrored | `string` | n/a | yes |
| [repo\_endpoint](#input\_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](#input\_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.