Skip to content

Commit 8503328

Browse files
committed
Link to Explanation page to setup commodore command
Removes the need to maintain another version of the commodore alias, which might get outdated.
1 parent 0554b7f commit 8503328

2 files changed

Lines changed: 3 additions & 30 deletions

File tree

commodore_command.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
#!/usr/bin/env bash
22

3-
commodore () {
4-
docker run \
5-
--env-file=.env \
6-
--interactive=true \
7-
--tty \
8-
--rm \
9-
--user="$(id -u)" \
10-
--volume "${HOME}/.ssh:/app/.ssh:ro" \
11-
--volume "${HOME}/.gitconfig:/app/.gitconfig:ro" \
12-
--volume "${PWD}:/app/data/" \
13-
--workdir "/app/data" \
14-
projectsyn/commodore:v0.3.0 \
15-
$*
16-
}
17-
183
commodore_compile_all() {
194
CLUSTERS=($(kubectl --context minikube -n lieutenant get cluster -o jsonpath="{$.items[*].metadata.name}"))
205
for CLUSTER in "${CLUSTERS[@]}"; do

docs/modules/ROOT/pages/index.adoc

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ To follow this tutorial you will need quite an array of software in your system:
3737
* https://k3d.io/[K3d] version 3.0
3838
* A https://about.gitlab.com/[GitLab] account with your https://gitlab.com/profile/keys[SSH key configured]. You can use a private GitLab instance, if you have one nearby.
3939
* A https://github.com/[GitHub] account with your https://github.com/settings/keys[SSH key configured].
40+
* SSH-agent running with your SSH key added.
4041
* The following commands must be installed and available in your path: https://curl.haxx.se/[curl], https://stedolan.github.io/jq/[jq], `ssh-keyscan`, and `base64`.
4142
** Although not required by this tutorial, you could also install https://github.com/mikefarah/yq[yq] and https://k9scli.io/[k9s], both very useful when working with Commodore Components.
4243
* We will be editing files with https://code.visualstudio.com/[Visual Studio Code] together with the following extensions:
@@ -167,20 +168,7 @@ Now we're getting to the actual subject of this tutorial! Let us dive into the r
167168

168169
=== Using the Commodore Docker Image
169170

170-
We are going to use now the `commodore` tool to generate and compile our new component. This tool is written in Python and requires quite a few dependencies; to make our lives easier, we are instead going to use the corresponding https://hub.docker.com/r/projectsyn/commodore[container image available in Docker Hub]. This is why it is strongly recommended that you define the following function in your environment, which will make using `commodore` a much simpler task:
171-
172-
[source,bash]
173-
----
174-
$ which commodore
175-
commodore not found
176-
177-
$ source ./commodore_command.sh
178-
179-
$ which commodore
180-
commodore () {
181-
docker run --env-file=.env --interactive=true --tty --rm --user="$(id -u)" --volume "$HOME"/.ssh:/app/.ssh:ro --volume "$PWD"/compiled/:/app/compiled/ --volume "$PWD"/catalog/:/app/catalog --volume "$PWD"/dependencies/:/app/dependencies/ --volume "$PWD"/inventory/:/app/inventory/ --volume ~/.gitconfig:/app/.gitconfig:ro projectsyn/commodore:v0.2.0 "$*"
182-
}
183-
----
171+
We are going to use now the `commodore` tool to generate and compile our new component. This tool is written in Python and requires quite a few dependencies; to make our lives easier, we are instead going to use the corresponding https://hub.docker.com/r/projectsyn/commodore[container image available in Docker Hub]. This is why it is strongly recommended that you define the following function in your environment, which will make using `commodore` a much simpler task. See https://docs.syn.tools/commodore/running-commodore.html[Running Commodore].
184172

185173
=== Checking out the Commodore Project
186174

@@ -534,7 +522,7 @@ cluster.syn.tools "c-aged-sea-7813" deleted
534522
cluster.syn.tools "c-snowy-sunset-5873" deleted
535523
===> Removing tenant
536524
tenant.syn.tools "t-solitary-field-4017" deleted
537-
===> Waiting 20 seconds for the removal of GitLab repositories
525+
===> Waiting 20 seconds for the removal of GitLab repositories
538526
🔥 Deleting "minikube" in docker ...
539527
🔥 Deleting container "minikube" ...
540528
🔥 Removing /home/username/.minikube/machines/minikube ...

0 commit comments

Comments
 (0)