Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ See [https://github.com/dodevops/kc](the kc website) for details.

## Usage

*CloudControl* can be used best with docker-compose. Check out the `sample` directory in a flavour for a sample
*CloudControl* can be used best with `docker compose`. Check out the `sample` directory in a flavour for a sample
compose file and to convenience scripts. It includes a small web server written in Go and Vuejs-client dubbed
"CloudControlCenter", which is used as a status screen. It listens to port 8080 inside the container.

Copy the compose file and configure it to your needs. Check below for configuration options per flavour and feature.

Run `init.sh`. This script basically just runs `docker-compose up -d` and tells you the URL for CloudControlCenter.
Run `init.sh`. This script basically just runs `docker compose up -d` and tells you the URL for CloudControlCenter.
Open it and wait for *CloudControl* to finish initializing.

The initialization process will download and configure the additional tools and completes with a message when its done.
It will run each time when the stack is recreated.

After the initialization process you can simply run `docker-compose exec cli /usr/local/bin/cloudcontrol run` to jump
After the initialization process you can simply run `docker compose exec cli /usr/local/bin/cloudcontrol run` to jump
into the running container and work with the installed features.

If you need to change any of the configuration environment variables, rerun the init script afterwards to apply
Expand Down Expand Up @@ -178,7 +178,7 @@ provided base images for all architectures (e.g. the Apple ARM-based processors)
for the available platforms per flavour.

As a workaround this, you can use the [`platform`](https://docs.docker.com/compose/compose-file/compose-file-v2/#platform)
parameter for docker-compose or the `--platform` parameter for `docker run` to specify a compatible architecture
parameter for `docker compose` or the `--platform` parameter for `docker run` to specify a compatible architecture
(e.g. linux/amd64 on Apple ARM-based machines).

### How can I add an informational text for users of *CloudControl*?
Expand All @@ -191,8 +191,8 @@ set the environment variable `MOTD_DISPLAY_DEFAULT` to *yes*.

If you'd like to forward traffic into a cluster using `kubectl port-forward` you can do the following:

* Add a ports key to the cli-service in your docker-compose file to forward a free port on your host to a defined
port in your container. The docker-compose-files in the sample directories already use port 8081 for this.
* Add a ports key to the cli-service in your docker-compose.yaml file to forward a free port on your host to a defined
port in your container. The docker-compose.yaml-files in the sample directories already use port 8081 for this.

* Inside *CloudControl*, check the IP of the container:

Expand All @@ -218,7 +218,7 @@ kubectl port-forward --address 172.21.0.2 svc/my-service 8081:8080
* Check out, which host port docker bound to the private port you set up (e.g. 8081)

```
docker-compose port cli 8081
docker compose port cli 8081
```

* Connect to localhost:[host port] on your host
Expand All @@ -239,7 +239,7 @@ Also, to not enter your passphrase every time you use the key, you should mount
container and set the environment variable SSH_AUTH_SOCK to that path. *CloudControl* will automatically fix the
permissions of that file so the *CloudControl* user can use it.

Here are snippets for your docker-compose file for convenience:
Here are snippets for your docker-compose.yaml file for convenience:

(...)
volumes:
Expand Down Expand Up @@ -271,15 +271,14 @@ messages look like this:
It's hard to identify from that who the other *CloudControl* user is, that may have opened a lock. The system
user can't be changed, but it's possible to set a better hostname than the one Docker autogenerated.

See this docker-compose snippet on how to set a better hostname:
See this docker-compose.yaml snippet on how to set a better hostname:

version: "3"
services:
cli:
image: "dodevops/cloudcontrol-azure:latest"
hostname: "[TODO yourname]"
volumes:
(...)
cli:
image: "dodevops/cloudcontrol-azure:latest"
hostname: "[TODO yourname]"
volumes:
(...)

If you set hostname in that snippet to "alice", the state lock will look like this now:

Expand Down Expand Up @@ -313,7 +312,7 @@ Use the `docker logs` command with the failed container to see the complete log
installation.

If you are really stuck, you can convince the container to keep running by setting "CONTINUE_ON_ERROR=yes" as an
environment variable in the docker-compose file. Then you can debug with the running container.
environment variable in the docker-compose.yaml file. Then you can debug with the running container.

## Flavours

Expand Down
31 changes: 15 additions & 16 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ Following features and tools are supported:

## Usage

*CloudControl* can be used best with docker-compose. Check out the `sample` directory in a flavour for a sample
*CloudControl* can be used best with `docker compose`. Check out the `sample` directory in a flavour for a sample
compose file and to convenience scripts. It includes a small web server written in Go and Vuejs-client dubbed
"CloudControlCenter", which is used as a status screen. It listens to port 8080 inside the container.

Copy the compose file and configure it to your needs. Check below for configuration options per flavour and feature.

Run `init.sh`. This script basically just runs `docker-compose up -d` and tells you the URL for CloudControlCenter.
Run `init.sh`. This script basically just runs `docker compose up -d` and tells you the URL for CloudControlCenter.
Open it and wait for *CloudControl* to finish initializing.

The initialization process will download and configure the additional tools and completes with a message when its done.
It will run each time when the stack is recreated.

After the initialization process you can simply run `docker-compose exec cli /usr/local/bin/cloudcontrol run` to jump
After the initialization process you can simply run `docker compose exec cli /usr/local/bin/cloudcontrol run` to jump
into the running container and work with the installed features.

If you need to change any of the configuration environment variables, rerun the init script afterwards to apply
Expand Down Expand Up @@ -115,7 +115,7 @@ provided base images for all architectures (e.g. the Apple ARM-based processors)
for the available platforms per flavour.

As a workaround this, you can use the [`platform`](https://docs.docker.com/compose/compose-file/compose-file-v2/#platform)
parameter for docker-compose or the `--platform` parameter for `docker run` to specify a compatible architecture
parameter for `docker compose` or the `--platform` parameter for `docker run` to specify a compatible architecture
(e.g. linux/amd64 on Apple ARM-based machines).

### How can I add an informational text for users of *CloudControl*?
Expand All @@ -128,8 +128,8 @@ set the environment variable `MOTD_DISPLAY_DEFAULT` to *yes*.

If you'd like to forward traffic into a cluster using `kubectl port-forward` you can do the following:

* Add a ports key to the cli-service in your docker-compose file to forward a free port on your host to a defined
port in your container. The docker-compose-files in the sample directories already use port 8081 for this.
* Add a ports key to the cli-service in your docker-compose.yaml file to forward a free port on your host to a defined
port in your container. The docker-compose.yaml-files in the sample directories already use port 8081 for this.

* Inside *CloudControl*, check the IP of the container:

Expand All @@ -155,7 +155,7 @@ kubectl port-forward --address 172.21.0.2 svc/my-service 8081:8080
* Check out, which host port docker bound to the private port you set up (e.g. 8081)

```
docker-compose port cli 8081
docker compose port cli 8081
```

* Connect to localhost:[host port] on your host
Expand All @@ -176,7 +176,7 @@ Also, to not enter your passphrase every time you use the key, you should mount
container and set the environment variable SSH_AUTH_SOCK to that path. *CloudControl* will automatically fix the
permissions of that file so the *CloudControl* user can use it.

Here are snippets for your docker-compose file for convenience:
Here are snippets for your docker-compose.yaml file for convenience:

(...)
volumes:
Expand Down Expand Up @@ -208,15 +208,14 @@ messages look like this:
It's hard to identify from that who the other *CloudControl* user is, that may have opened a lock. The system
user can't be changed, but it's possible to set a better hostname than the one Docker autogenerated.

See this docker-compose snippet on how to set a better hostname:
See this docker-compose.yaml snippet on how to set a better hostname:

version: "3"
services:
cli:
image: "dodevops/cloudcontrol-azure:latest"
hostname: "[TODO yourname]"
volumes:
(...)
cli:
image: "dodevops/cloudcontrol-azure:latest"
hostname: "[TODO yourname]"
volumes:
(...)

If you set hostname in that snippet to "alice", the state lock will look like this now:

Expand Down Expand Up @@ -250,7 +249,7 @@ Use the `docker logs` command with the failed container to see the complete log
installation.

If you are really stuck, you can convince the container to keep running by setting "CONTINUE_ON_ERROR=yes" as an
environment variable in the docker-compose file. Then you can debug with the running container.
environment variable in the docker-compose.yaml file. Then you can debug with the running container.

## Flavours

Expand Down
4 changes: 2 additions & 2 deletions ccc-client/src/components/MainScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<p>CloudControl has been initialized. Run the following to enter the container:</p>
<v-banner theme="dark" lines="one" class="my-4">
<v-banner-text>
docker-compose exec cli /usr/local/bin/cloudcontrol run
docker compose exec cli /usr/local/bin/cloudcontrol run
</v-banner-text>
<template v-slot:actions>
<v-btn icon="mdi-content-copy"
v-on:click="copyCommand('docker-compose exec cli /usr/local/bin/cloudcontrol run')">
v-on:click="copyCommand('docker compose exec cli /usr/local/bin/cloudcontrol run')">
</v-btn>
</template>
</v-banner>
Expand Down
12 changes: 6 additions & 6 deletions contrib/cloudcontrol-host/cloudcontrol
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ then
then
echo "Reinitializing ${CONTEXT} CLOUDCONTROL"
echo "Please use Ctrl-C after the initialization has finished and then rerun cc"
docker-compose down
docker compose down
bash init.sh
elif [ "${SELECTEDMENU}" == "ccc" ]
then
CCC_PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
CCC_PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "Starting CloudControlCenter on port ${CCC_PORT} for ${CONTEXT}"
open "http://localhost:${CCC_PORT}"
elif [ "${SELECTEDMENU}" == "stop" ]
then
docker-compose stop
docker compose stop
elif [ "${SELECTEDMENU}" == "down" ]
then
docker-compose down
docker compose down
fi
else
# Enter CloudControl context
echo "Entering ${CONTEXT} CLOUDCONTROL"
docker-compose up -d
docker-compose exec cli /usr/local/bin/cloudcontrol run
docker compose up -d
docker compose exec cli /usr/local/bin/cloudcontrol run
fi
fi

Expand Down
1 change: 0 additions & 1 deletion flavour/aws/sample/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cli:
image: "ghcr.io/dodevops/cloudcontrol-aws:latest"
Expand Down
6 changes: 3 additions & 3 deletions flavour/aws/sample/init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d

PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "CloudControl is initializing. Check out http://localhost:${PORT} for details"
1 change: 0 additions & 1 deletion flavour/azure/sample/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cli:
image: "ghcr.io/dodevops/cloudcontrol-azure:latest"
Expand Down
6 changes: 3 additions & 3 deletions flavour/azure/sample/init.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d

PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "CloudControl is initializing. Check out http://localhost:${PORT} for details"

1 change: 0 additions & 1 deletion flavour/gcloud/sample/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cli:
volumes:
Expand Down
6 changes: 3 additions & 3 deletions flavour/gcloud/sample/init.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d

PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "CloudControl is initializing. Check out http://localhost:${PORT} for details"

1 change: 0 additions & 1 deletion flavour/simple/sample/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cli:
image: "ghcr.io/dodevops/cloudcontrol-simple:latest"
Expand Down
6 changes: 3 additions & 3 deletions flavour/simple/sample/init.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d

PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "CloudControl is initializing. Check out http://localhost:${PORT} for details"

1 change: 0 additions & 1 deletion flavour/tanzu/sample/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cli:
image: "ghcr.io/dodevops/cloudcontrol-tanzu:latest"
Expand Down
6 changes: 3 additions & 3 deletions flavour/tanzu/sample/init.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d

PORT=$(docker-compose port cli 8080 | cut -d ":" -f 2)
PORT=$(docker compose port cli 8080 | cut -d ":" -f 2)
echo "CloudControl is initializing. Check out http://localhost:${PORT} for details"

7 changes: 4 additions & 3 deletions internal/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package internal

import (
"fmt"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strings"

"github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
)

// Feature describes a feature in the filesystem
Expand Down Expand Up @@ -161,7 +162,7 @@ func (backend *Backend) initialization() func() {

logrus.Info("Finished initialization")
logrus.Info("Please run the following to enter CloudControl")
logrus.Info("docker-compose exec cli /usr/local/bin/cloudcontrol run")
logrus.Info("docker compose exec cli /usr/local/bin/cloudcontrol run")

backend.Status = "INITIALIZED"
}
Expand Down