Skip to content

Commit 9bd3870

Browse files
author
Andrew Suderman
committed
v8 - Major changes and versioning decisions
Removing npm and pip test references in run.sh Adding a design doc. Fixes FairwindsOps#227
1 parent 1ead3a8 commit 9bd3870

File tree

17 files changed

+95
-174
lines changed

17 files changed

+95
-174
lines changed

.circleci/config.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ references:
4040
echo "Skipping the docker push because '\$DOCKER_BASE_TAG: $DOCKER_BASE_TAG' does not start with dev- or v[0-9]+."
4141
fi
4242
43-
npm_release: &npm_release
44-
run:
45-
name: NPM release
46-
command: |
47-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
48-
echo $CIRCLE_TAG | xargs npm version --no-git-tag-version
49-
npm publish
50-
5143
github_release: &github_release
5244
run:
5345
name: GitHub release
@@ -99,7 +91,6 @@ jobs:
9991
- *docker_login
10092
- *docker_build
10193
- *docker_push
102-
- *npm_release
10394

10495

10596
workflows:

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
package-lock.json
2-
*egg-info
31
.vscode
42
.DS_Store

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# How to contribute
2+
3+
Issues, whether bugs, tasks, or feature requests are essential for keeping rok8s-scripts (and ReactiveOps in general) great.
4+
We believe it should be as easy as possible to contribute changes that
5+
get things working in your environment. There are a few guidelines that we
6+
need contributors to follow so that we can have a chance of keeping on
7+
top of things.
8+
9+
## Getting Started
10+
11+
* Submit an issue, assuming one does not already exist.
12+
* Clearly describe the issue including steps to reproduce when it is a bug.
13+
* Apply the appropriate labels, whether it is bug, feature, or task.
14+
15+
## Making Changes
16+
17+
* Create a feature branch from where you want to base your work.
18+
* This is usually the master branch.
19+
* To quickly create a topic branch based on master; `git checkout -b
20+
feature master`. Please avoid working directly on the
21+
`master` branch.
22+
* Try to make commits of logical units.
23+
* Make sure you have added the necessary tests for your changes if applicable.
24+
* Make sure you have added any required documentation changes.
25+
26+
## Making Trivial Changes
27+
28+
### Documentation
29+
30+
For changes of a trivial nature to comments and documentation, it is not
31+
always necessary to create a new issue in GitHub. In these cases, a branch with pull request is sufficient.
32+
33+
## Submitting Changes
34+
35+
* Push your changes to a topic branch.
36+
* Submit a pull request.
37+
* Mention the issue in your PR description. I.E. `Fixes #42`. This will ensure that your issue gets tagged with the PR.
38+
39+
40+
Attribution
41+
===========
42+
Portions of this text are copied from the [Puppet Contributing](https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md) documentation.

DESIGN.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# rok8s-scripts Design Doc
2+
3+
## Introduction
4+
5+
This is a set of opinionated scripts for managing application development and deployment lifecycle using Kubernetes. These simplify secure secrets management, environment specific config, Docker build caching, and much more. The opinionated nature of the scripts reflects the collective experience and observed best-practices that ReactiveOps has accumulated.
6+
7+
## Guiding Principles
8+
9+
There are several things that are to be kept in mind while maintaining rok8s-scripts.. They should act as baseline from which to make decisions.
10+
11+
**Ease of Use**
12+
It should be relatively trivial to take an existing Dockerized application and construct a pipleline to build and deploy it using rok8s-scripts.
13+
14+
**Backward Compatibility**
15+
When introducing a new feature to rok8s-scripts, it should be backward-compatible. If it might break something, we prefer to contain it inside of an environment variable feature flag in order to make the feature optional. If this is not possible, sufficient care should be taken to notify customers and increment version accordingly.
16+
17+
**Scope**
18+
As maintainers of rok8s-scripts, ReactiveOps is not in the business of catering to every single hand-crafted bespoke pipeline in existence. This means that some changes may be out of scope for the intended purpose. The intended purpose is to build, push, and deploy containers.
19+
20+
**Pull Requests Welcom**
21+
Please don't hesistate to reach out and file a PR or an Issue if you would like to see something implemented. See [CONTRIBUTING](CONTRIBUTING.md)

LICENSE.k8s renamed to LICENSE

File renamed without changes.

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Each new release of rok8s-scripts comes with a new set of CI images for simple w
1010

1111
We currently include a variety of CI Images, including Alpine and Debian Stretch as our recommended starting points. In certain cases you may want to use our images that include Node.js or Golang.
1212

13-
The latest Debian Stretch release can be pulled from `quay.io/reactiveops/ci-images:v7-stretch`. A full list of the latest image tags is available on our [Quay repository](https://quay.io/repository/reactiveops/ci-images).
13+
The latest Debian Stretch release can be pulled from `quay.io/reactiveops/ci-images:v8-stretch`. A full list of the latest image tags is available on our [Quay repository](https://quay.io/repository/reactiveops/ci-images).
1414

1515
## Examples
1616

@@ -25,11 +25,31 @@ Most notably, the CI example includes sample configuration for the following pla
2525

2626
On their own, these examples may not make a lot of sense. There's a lot more documentation below that should cover everything included in these examples and more.
2727

28+
## Versioning v8.0.0 and beyond
29+
30+
Rok8s-scripts contains a number of dependencies that have various ways of versioning themselves. Most notably, Helm tends to break backward compatibility with every minor release. We have decided that post v8 of rok8s-scripts, we will update our versions according to the version change of the underlying tool. For example, if Helm changes from `2.13.0` to `2.14.0`, we will change the version of rok8s scripts by one minor version. This will be clearly mentioned in the release notes. This means that a minor version of rok8s-scripts could introduce breaking changes to the CI/CD pipelines that are using it.
31+
32+
Please note that we will still commit to any patch version releases being backward-compatible. We will never release a patch version that upgrades an underlying tool beyond a patch version, and we will not release any patch versions of rok8s-scripts that introduce a breaking change.
33+
34+
Here is a set of guidelines to follow when deciding what version of ci-images (and thus rok8s-scripts) to use:
35+
36+
#### You are very risk-averse
37+
38+
You want rok8s-scripts to be stable, and just keep working until you decide to upgrade.
39+
40+
In this scenario, you should pin to a minor version of rok8s-scripts such as `v8.0-alpine`.
41+
42+
#### You like to live dangerously
43+
44+
You are okay with your pipeline breaking occasionally and having to upgrade things as they break.
45+
46+
In this case, go ahead and pin to a major version such as `v8-alpine`
47+
2848
## Further Reading
2949

3050
- [Building and Pushing Docker Images](/docs/docker.md)
31-
- [Deploying to Kubernetes with Helm](/docs/helm.md)
32-
- [Deploying to Kubernetes without Helm](/docs/without_helm.md)
51+
- [Deploying to Kubernetes with Helm](/docs/Helm.md)
52+
- [Deploying to Kubernetes without Helm](/docs/without_Helm.md)
3353
- [Managing Kubernetes Secrets Securely](/docs/secrets.md)
3454

3555
### Cloud Specific Documentation

bin/install-rok8s-requirements

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ else
3232
PKG_INSTALL="${PKG_MANAGER} install -y"
3333
fi
3434

35-
KUBECTL_VERSION="${KUBECTL_VERSION:-v1.11.6}"
36-
HELM_VERSION="${HELM_VERSION:-v2.12.2}"
37-
SOPS_VERSION="${SOPS_VERSION:-3.0.5}"
35+
KUBECTL_VERSION="${KUBECTL_VERSION:-v1.12.6}"
36+
HELM_VERSION="${HELM_VERSION:-v2.13.0}"
37+
SOPS_VERSION="${SOPS_VERSION:-3.2.0}"
3838

3939
# make sure sudo is installed
4040
if ! hash sudo 2>/dev/null; then

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Each new release of rok8s-scripts comes with a new set of CI images for simple w
88

99
We currently include a variety of CI Images, including Alpine and Debian Stretch as our recommended starting points. In certain cases you may want to use our images that include Node.js or Golang.
1010

11-
The latest Debian Stretch release can be pulled from `quay.io/reactiveops/ci-images:v7-stretch`. A full list of the latest image tags is available on our [Quay repository](https://quay.io/repository/reactiveops/ci-images).
11+
The latest Debian Stretch release can be pulled from `quay.io/reactiveops/ci-images:v8-stretch`. A full list of the latest image tags is available on our [Quay repository](https://quay.io/repository/reactiveops/ci-images).
1212

1313
## Examples
1414

docs/releasing.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Releasing New Versions of rok8s-scripts
22

3-
## Before Merging the Pull Request!
4-
Please be sure to update `./setup.py` and `./package.json` to reflect the new version you wish to release. CODEOWNERS should be able to answer what the next version to release should be.
5-
63
## Creating the Tag
74

85
Create an annotated tag on the commit you would like to release

examples/ci/.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ references:
1414
1515
deploy_steps: &deploy_steps
1616
docker:
17-
- image: quay.io/reactiveops/ci-images:v7-alpine
17+
- image: quay.io/reactiveops/ci-images:v8-alpine
1818
steps:
1919
- checkout
2020
- *set_environment_variables
@@ -24,7 +24,7 @@ references:
2424
jobs:
2525
imagebuild:
2626
docker:
27-
- image: quay.io/reactiveops/ci-images:v7-alpine
27+
- image: quay.io/reactiveops/ci-images:v8-alpine
2828
steps:
2929
- checkout
3030
- setup_remote_docker

examples/ci/.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variables:
1313
DOCKER_HOST: tcp://localhost:2375
1414
DOCKER_DRIVER: overlay2
1515

16-
image: quay.io/reactiveops/ci-images:v7-alpine
16+
image: quay.io/reactiveops/ci-images:v8-alpine
1717
services:
1818
- docker:dind
1919

@@ -75,4 +75,4 @@ deploy_production:
7575
- helm-deploy -f $ROK8S_CONFIG
7676
only:
7777
- /^v.*/
78-
when: manual
78+
when: manual

examples/ci/bitbucket-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: quay.io/reactiveops/ci-images:v7-stretch
1+
image: quay.io/reactiveops/ci-images:v8-stretch
22

33
aliases:
44
- &initialize-env |

package.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

test/npm.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/pip.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/run.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,6 @@ else
1515
EXIT_CODE=1
1616
fi
1717

18-
echo "------------------------"
19-
echo "Running NPM Tests"
20-
echo "------------------------"
21-
22-
if test/npm.sh ; then
23-
echo "✅ NPM Tests Passed"
24-
else
25-
echo "⛔️ NPM Tests Failed"
26-
EXIT_CODE=1
27-
fi
28-
29-
echo "------------------------"
30-
echo "Running Pip Tests"
31-
echo "------------------------"
32-
33-
if test/pip.sh ; then
34-
echo "✅ Pip Tests Passed"
35-
else
36-
echo "⛔️ Pip Tests Failed"
37-
EXIT_CODE=1
38-
fi
39-
4018
echo "------------------------"
4119
echo "Running K8S Lint Tests"
4220
echo "------------------------"

0 commit comments

Comments
 (0)