Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Use fluxctl install in the guides
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio authored and hiddeco committed Aug 16, 2019
1 parent 3c9a85e commit 6fcee09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 58 deletions.
36 changes: 5 additions & 31 deletions docs/tutorials/driving-flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,12 @@ deployment](https://github.com/fluxcd/flux-get-started) and click on the

## Setup

Get the source code of Flux:
First, please [install `fluxctl`](../references/fluxctl.md).

```sh
git clone https://github.com/fluxcd/flux
cd flux
```

In the next step, let's change the Git URL of Flux to point to our fork:

```sh
EDITOR deploy/flux-deployment.yaml
```

And update the following line

```yaml
[email protected]:fluxcd/flux-get-started
```

to point to your fork, e.g. if your GitHub Login is `baloothebear`, the line
above should be

```yaml
[email protected]:baloothebear/flux-get-started
```

Save the file. For our simple case, that's all the configuration we need. Now
it's time to deploy Flux. Simply run
Then, run

```sh
kubectl apply -f deploy
fluxctl install [email protected]/<your-user>/flux-get-started [email protected] | kubectl apply -f -
```

### Alternative: Using Helm for the setup
Expand Down Expand Up @@ -106,9 +81,8 @@ namespace.
The first step is done. Flux is now and up running (you can confirm by
running `kubectl get pods --all-namespaces`).

In the second step we will use fluxctl to talk to Flux in the cluster and
interact with the deployments. First, please [install fluxctl](../references/fluxctl.md).
(It enables you to drive all of Weave Flux, so have a look at the output of
In the second step we will use `fluxctl` to talk to Flux in the cluster and
interact with the deployments. (It enables you to drive all of Flux, so have a look at the output of
`fluxctl -h` to get a better idea.)

> **Note:** Another option (without installing `fluxctl` is to take a look
Expand Down
38 changes: 11 additions & 27 deletions docs/tutorials/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ will work as well though.

### A note on GKE with RBAC enabled

If working on e.g. GKE with RBAC enabled, you will need to add a clusterrolebinding:
If working on e.g. GKE with RBAC enabled, you will need to add a `ClusterRoleBinding`:

```sh
kubectl create clusterrolebinding "cluster-admin-$(whoami)" --clusterrole=cluster-admin --user="$(gcloud config get-value core/account)"
Expand All @@ -32,37 +32,21 @@ extra privileges:

## Set up Flux

Get Flux:
In our example we are going to use
[flux-get-started](https://github.com/fluxcd/flux-get-started). If you
want to use that too, be sure to create a fork of it on GitHub.

```sh
git clone https://github.com/fluxcd/flux
cd flux
```
First, please [install `fluxctl`](../references/fluxctl.md).

Now you can go ahead and edit Flux's deployment manifest. At the very
least you will have to change the `--git-url` parameter to point to
the config repository for the workloads you want Flux to deploy for
you. You are going to need access to this repository.
Then, install flux in your Cluster:

```sh
$EDITOR deploy/flux-deployment.yaml
fluxctl install [email protected]/<your-user>/flux-get-started --git-path=namespaces,workloads [email protected] | kubectl apply -f -
```

In our example we are going to use [`fluxcd/flux-get-started`](https://github.com/fluxcd/flux-get-started).
If you want to use that too, be sure to create a fork of it on GitHub
and add the git URL to the config file above. After that, set the
`--git-path` flag to `--git-path=namespaces,workloads`, this is meant
to exclude Helm manifests. Again, if you want to get started with Helm,
please refer to the ["Get started with Flux using Helm"](get-started-helm.md)
tutorial.

## Deploying Flux to the cluster

In the next step, deploy Flux to the cluster:

```sh
kubectl apply -f deploy
```
`--git-path=namespaces,workloads`, is meant to exclude Helm
manifests. Again, if you want to get started with Helm, please refer to the
[Helm section](get-started-helm.md).

Allow some time for all containers to get up and running. If you're
impatient, run the following command and see the pod creation
Expand All @@ -75,7 +59,7 @@ watch kubectl get pods --all-namespaces
## Giving write access

At startup Flux generates a SSH key and logs the public key. Find
the SSH public key by installing [fluxctl](../references/fluxctl.md) and
the SSH public key by installing [`fluxctl`](../references/fluxctl.md) and
running:

```sh
Expand Down

0 comments on commit 6fcee09

Please sign in to comment.