infrastructure as code; bring your own application
keep it simple. keep it boring. keep it DRY
Target Platforms:
Issue Tracker: https://github.com/gneisstech/bedrock/issues
The "BeachHead" cluster example
The "SunnyDay" sample application
Kitchen sink - included.
kubectl port-forward
to the front end for those servicesWork in process:
General philosophies:
ZZ
redundancy where (time to populate pods on new node
/ ZZ
) works for your SLA
Bedrock tools can anchor to and function at the root of a git repository, or at any subdirectory within a repository to support those who prefer a mono-repo rather than one repo per microservice or application.
A minimal repository subdirectory containing a microservice with bedrock installed will generally have the following structure (for a simple web service):
├── .bedrock
│ └── ci
│ ├── pipelines
│ │ └── azure
│ │ └── bless_artifacts.yaml
│ └── recipes
│ ├── blackduck_scanner.sh
│ ├── init_bedrock_tools.sh
│ ├── invoke_bedrock_recipe.sh
│ └── report_metric_to_datadog.sh
├── helm
│ └── unique-service-name
│ ├── Chart.yaml
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ ├── environment-configmap.yaml
│ │ ├── environment-secrets.yaml
│ │ ├── ingress.yaml
│ │ ├── service.yaml
│ │ ├── serviceaccount.yaml
│ │ └── tests
│ │ └── test-connection.yaml
│ └── values.yaml
├── Dockerfile
└── semver.txt
As the developer, you will be responsible for the contents of the Dockerfile
to build your microservice, and for
customization of the helm chart contents for your microservice. Especially the contents of values.yaml
.
Bedrock will be responsible for updating and maintaining the contents of semver.txt
, Chart.yaml
(the semantic
versions therein), and will add the git repository tag with a semantic version for your service upon a successful
commit + successful CI pipeline based on that commit.
During installation, Bedrock will create and manage the entire contents of the hidden folder .bedrock
based on its
determination of whether the current subdirectory of the repo represents a service
or an applcation
.
Bedrock will also create and install the commit based CI pipeline described in
.bedrock/ci/pipelines/azure/bless_artifacts.yaml
(or as appropriate for your non-azure CI system)
Check out your git reposistory and the branch you wish to use. Switch to the subdirectory (generally git root, unless you have multiple service or applications in one repository) of that repository.
docker run --rm gneisstech/bedrock_tools install
docker run --rm gneisstech/bedrock_tools upgrade
docker run --rm gneisstech/bedrock_tools update
Bedrock will automatically identify many omissions and misconfigurations when you run:
docker run --rm gneisstech/bedrock_tools doctor
MIT License
Copyright (c) 2020-, Gneiss Technology LLC
Copyright (c) 2017-2019, Cloud Scaling
Copyright (c) 2016-2017, techguru@byiq.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.