Get Started
Installation
Build from source:
git clone https://github.com/afternun/buckmate.git && go build -C buckmate && mv buckmate/buckmate /usr/local/bin
or download latest release from GitHub:
curl https://github.com/afternun/buckmate/releases/latest/download/buckmate_Darwin_arm64.tar.gz -LO && tar -xzvf buckmate_Darwin_arm64.tar.gz && mv buckmate /usr/local/bin
curl https://github.com/afternun/buckmate/releases/latest/download/buckmate_Darwin_x86_64.tar.gz -LO && tar -xzvf buckmate_Darwin_x86_64.tar.gz && mv buckmate /usr/local/bin
curl https://github.com/afternun/buckmate/releases/latest/download/buckmate_Linux_arm64.tar.gz -LO && tar -xzvf buckmate_Linux_arm64.tar.gz && mv buckmate /usr/local/bin
curl https://github.com/afternun/buckmate/releases/latest/download/buckmate_Linux_i386.tar.gz -LO && tar -xzvf buckmate_Linux_i386.tar.gz && mv buckmate /usr/local/bin
curl https://github.com/afternun/buckmate/releases/latest/download/buckmate_Linux_x86_64.tar.gz -LO && tar -xzvf buckmate_Linux_x86_64.tar.gz && mv buckmate /usr/local/bin
curl.exe https://github.com/afternun/buckmate/releases/latest/download/buckmate_Windows_arm64.tar.gz -LO
curl.exe https://github.com/afternun/buckmate/releases/latest/download/buckmate_Windows_i386.tar.gz -LO
curl.exe https://github.com/afternun/buckmate/releases/latest/download/buckmate_Windows_x86_64.tar.gz -LO
Append directory containing above binary to PATH environment variable
Initial setup
Configure AWS credentials
If you are deploying to or from AWS S3 bucket configure AWS credentials according to their instructions.
Examples
Take a look at example
directory in the code repository
In the directory create:
-
Deployment.yaml
- here you define common configuration for your deployment, one that is shared across any environment that you work onsource: address: location from which files should be copied (use `s3://` prefix for s3 buckets, absolute path for files on disk, or path relative to location of this file) target: address: location to which files should be copied (use `s3://` prefix for s3 buckets, absolute path for files on disk, or path relative to location of this file) configBoundary: string that acts as prefix and suffix for config map values (Default %%%) configMap: string key: string value
Config Map
buckmate will go over files downloaded from source
and files defined in files
directory and look for strings that are wrapped in configBoundary
. If such string is found, it will be replaced with corresponding value from configMap
.
Example: If a file would contain string %%%header%%%
and configMap
an entry header: My Awesome Header
, string %%%header%%%
would be replaced with My Awesome Header
.
Environment specific configuration takes precedence over common configuration
-
(Optional):
files
directoryThis can hold any files that will be copied alongside files downloaded from
source
-
(Optional): directory with name of your choosing with another
Deployment.yaml
andfiles
directoryThis can hold environment specific configuration. To use it, run buckmate with
--env
flag
Run
buckmate apply
Versioning
buckmate will add metadata to S3 objects buckmate-version
with UUID string as value.
This is used to differentiate between previous and new deployment. Files that do not match new version will be removed on the deployment.