Skip to content

Commit

Permalink
feat: v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
abdennour committed Jul 25, 2021
1 parent d6eb3f6 commit 7fae600
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
GOOGLE_ANALYTICS_KEY=
BUCKET_BINARIES=
CFN_STACK_NAME=cks-cli-web
CFN_ENVIRONMENT=prod
CFN_SSL_CERT_ARN=arn:aws:acm:REGION:ACCOUNTID:certificate/UUID
CFN_HOSTS=host.example.com,host2.example.com
BUCKET_WEBSITE=
AWS_REGION=
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ build-all:

release-binary:
make build-all
aws s3 sync ./bin/ s3://$(BUCKET_BINARIES)/cks-cli/$(VERSION) --delete --region eu-west-1
aws s3 sync s3://$(BUCKET_BINARIES)/cks-cli/$(VERSION) s3://$(BUCKET_BINARIES)/cks-cli/latest --delete --region eu-west-1
aws s3 sync ./bin/ s3://$(BUCKET_BINARIES)/cks-cli/$(VERSION) --delete --region $(BUCKET_BINARIES_AWS_REGION)
aws s3 sync s3://$(BUCKET_BINARIES)/cks-cli/$(VERSION) s3://$(BUCKET_BINARIES)/cks-cli/latest --delete --region $(BUCKET_BINARIES_AWS_REGION)
mkdocs-serve:
docker build -t $(MKDOCS_IMAGE) -f docs/build/Dockerfile docs/build
docker run --name mkdocs-serve --rm --env-file .env -v $(PWD):/docs -p $(MKDOCS_PORT):8000 $(MKDOCS_IMAGE)
Expand All @@ -32,7 +32,7 @@ mkdocs-gen:

release-docs:
make mkdocs-gen
aws s3 sync ./public/ s3://$(BUCKET_WEBSITE)/ --delete --region us-east-1
aws s3 sync ./public/ s3://$(BUCKET_WEBSITE)/ --delete --region $(BUCKET_WEBSITE_AWS_REGION)

release-infra:
echo bash deploy/cloudformation/apply.sh
Expand Down
19 changes: 19 additions & 0 deletions docs/getting-started/cli/falco.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Falco

```bash
NAME:
cks falco - teach falco in CKS context

USAGE:
cks falco command [command options] falco_install

COMMANDS:
check-requirements, req check if your machines meet requirements to install the cluster
install, i install falco (support Ubuntu 20 OS only for now)
tutorial, t, tuto tuto falco
rules, r rules falco
help, h Shows a list of commands or help for one command

OPTIONS:
--help, -h show help (default: false)
```
11 changes: 11 additions & 0 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@

```


## OS X

=== "Binary"
Download it then install it
```bash
curl -o cks https://k8s.tn/cks-cli/latest/cks-darwin-amd64 && \
chmod +x cks && sudo mv cks /usr/local/bin

```

72 changes: 70 additions & 2 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,79 @@ cks cluster join --master 172.31.118.222:6443 --token ppblkq.6uafwx1q03m0cxbq --
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.
Run 'kubectl get nodes' on the control-plane to see this node join the cluster
```
</details>

## Falco

**install falco**

Identify one of your worker nodes and install falco

```
$ cks falco install
```

<details>
<summary>Result</summary>

```
...
....
....
```

</details>


**Follow falco tutorial**

Enjoy a falco tutorial step by step

```
$ cks falco tuto
```

<details>
<summary>Result</summary>

```
____ _ ____ _____
/ ___| / \ | _ \_ _|
\___ \ / _ \ | |_) || |
___) / ___ \| _ < | |
|____/_/ \_\_| \_\|_|
### Create Namespace for the demo ###
kubectl create ns demo-falco
# Are you done? [y/n]:
......
.....
....
_____ _ _ ____
| ____| \ | | _ \
| _| | \| | | | |
| |___| |\ | |_| |
|_____|_| \_|____/
### Clean up namespace
kubectl delete ns demo-falco
## check another advanced tuto in this link :
https://k8s.tn/rdiL4i
# Clean up done? [y/n]: y
END of Falco Tuto - Congrats!
```

</details>
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ nav:
- CLI:
- Overview: getting-started/cli/index.md
- Cluster: getting-started/cli/cluster.md
- Falco: getting-started/cli/falco.md
# - Config: getting-started/cli/config.md
# - Filesystem: getting-started/cli/fs.md
# - Repository: getting-started/cli/repo.md
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func NewFalcoCommand() *cli.Command {
Name: "falco",
Aliases: []string{"f"},
ArgsUsage: "falco_install",
Usage: "manage cluster (support Ubuntu 20 OS only for now)",
Usage: "teach falco in CKS context",
Subcommands: cli.Commands{
{
Name: "check-requirements",
Expand All @@ -155,7 +155,7 @@ func NewFalcoCommand() *cli.Command {
{
Name: "install",
Aliases: []string{"i"},
Usage: "install falco",
Usage: "install falco (support Ubuntu 20 OS only for now)",
ArgsUsage: "",
Action: falco.Install,
Flags: falcoInstallFlags,
Expand Down

0 comments on commit 7fae600

Please sign in to comment.