Skip to content

Commit

Permalink
Get rid of .git-credentials and switch to GCS (#300)
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Baier <fabian@mesosphere.io>
Co-authored-by: Aleksey Dukhovniy <adukhovniy@mesosphere.io>
  • Loading branch information
3 people committed Jun 7, 2019
1 parent 98174cc commit a8053e7
Show file tree
Hide file tree
Showing 23 changed files with 606 additions and 922 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Expand Up @@ -7,7 +7,6 @@ jobs:
machine: true
steps:
- checkout
- run: echo "https://$GITHUB_USERNAME:$GITHUB_PASSWORD@github.com" > "test/.git-credentials"
- run: ./test/run_tests.sh
- run: |
git config user.name "Circle CI"
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Expand Up @@ -43,9 +43,7 @@ After updating CRD manifests, use `make deploy` to apply the new CRDs to your cl
### Build and run tests using docker
If you don't want to install kubebuilder and other dependencies of KUDO locally, you can optionally run build and tests inside a docker container which is what our CI does.

Right now, the project requires you to set-up `.git-credentials` file which the build expects to be located in the test directory inside this project (that's because for docker build to run, every file that we copy in has to be inside the passed build context).

If you have `.git-credentials` file set up, you can just run:
To run tests, you can just execute:

`./test/run_tests.sh`

Expand Down
4 changes: 0 additions & 4 deletions docs/cli.md
Expand Up @@ -33,9 +33,6 @@ This document demonstrates how to use the CLI but also shows what happens in `KU
### Requirements

- `kubectl` version `1.12.0` or newer
- Configure GitHub authentication to be able to pull from [kudobuilder/frameworks](https://github.com/kudobuilder/frameworks). See instructions for [git-credential-store](https://git-scm.com/docs/git-credential-store) and [creating a personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line).
- GitHub personal access token in `$HOME/.git-credentials` or
- GitHub Basic Auth via `GIT_USER` and `GIT_PASSWORD` environment variables exposed
- KUDO CRDs installed to your cluster and KUDO controller is running. See the [getting started guide](/docs/getting-started/) for instructions
- `kubectl kudo` is running outside your cluster

Expand Down Expand Up @@ -64,7 +61,6 @@ Usage:
Flags:
--all-dependencies Installs all dependency packages. (default "false")
--auto-approve Skip interactive approval when existing version found. (default "false")
--githubcredential string The file path to GitHub credential file. (default "$HOME/.git-credentials")
-h, --help help for install
--instance string The instance name. (default to Framework name)
--kubeconfig string The file path to Kubernetes configuration file. (default "$HOME/.kube/config")
Expand Down
10 changes: 0 additions & 10 deletions docs/getting-started.md
Expand Up @@ -37,16 +37,6 @@ minikube start --cpus=4 --memory=8192 --disk-size=40g
**Before** `kubectl apply -f config/crds` you will need to have:

* minikube running
* `~/.git-credentials` must exist with git credentials with details below.

### Setting up GitHub Credentials
In order to setup `~/.git-credentials` the file needs to have the format of:
```
https://<username>:<credential>@github.com
```

The username is your GitHub user name and the credential is your password. If you are using 2-factor authentication, the credentials will need to be an application [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line).


## Deploy your first Application

Expand Down
36 changes: 36 additions & 0 deletions docs/repository.md
@@ -0,0 +1,36 @@
---
title: Framework repository
type: docs
weight: 4
---
# Framework repository

KUDO CLI comes with built-in official repository of verified frameworks. Every time you use `kudo install ...` command, it always pulls package from this repository.

## Repository implementation

KUDO can work with any repository exposed over HTTP that conforms the expected structure. The official repository is hosted on Google Cloud Storage.

In the root of the repository we expect `index.yaml` file similar to the following example:

```yaml
apiVersion: v1
entries:
yourframework:
- apiVersion: v1alpha1
appVersion: 7.0.0
name: yourframework
urls:
- https://kudo-repository.storage.googleapis.com/elastic-0.1.0.tgz
version: 0.1.0
```

The url leads to a location where the tarball package is hosted. It could be internal as well as external url (inside that repository or outside).

## How to add new package

All official packages right now are mirrored from the [github repository](https://github.com/kudobuilder/frameworks). To add new framework, create a PR against that repo.

## How to update package

The process here is the same as for adding new package. You need to create PR against the [github repository](https://github.com/kudobuilder/frameworks).
25 changes: 16 additions & 9 deletions go.mod
Expand Up @@ -3,11 +3,12 @@ module github.com/kudobuilder/kudo
go 1.12

require (
cloud.google.com/go v0.36.0 // indirect
cloud.google.com/go v0.38.0 // indirect
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/Masterminds/semver v1.4.2
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 // indirect
github.com/emicklei/go-restful v2.9.0+incompatible // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/logr v0.1.0 // indirect
github.com/go-logr/zapr v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.18.0 // indirect
Expand All @@ -19,13 +20,15 @@ require (
github.com/gobuffalo/envy v1.6.15 // indirect
github.com/gogo/protobuf v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/google/uuid v1.1.0 // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
Expand Down Expand Up @@ -53,14 +56,18 @@ require (
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 // indirect
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
golang.org/x/oauth2 v0.0.0-20190212230446-3e8b2be13635 // indirect
golang.org/x/sys v0.0.0-20190213121743-983097b1a8a3 // indirect
golang.org/x/tools v0.0.0-20190214195451-78f9822548c1
golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d // indirect
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
golang.org/x/net v0.0.0-20190502183928-7f726cade0ab
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138
google.golang.org/appengine v1.5.0 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v9 v9.27.0
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.2.2
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a
k8s.io/api v0.0.0-20181213150558-05914d821849
Expand Down

0 comments on commit a8053e7

Please sign in to comment.