failed for 'nextcloud': YAMLToJSON: yaml: line 84: found character that cannot start any token
These are the steps I took during installation on an external machine
# apt install python3-pip python3-dev git
# echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
# apt-get update
# sudo apt-get install -y kubectl
# wget https://fluxcd.io/install.sh
# vim install.sh:96
VERSION_FLUX="0.14.2"
# bash install.sh
I had to modify the flux install.sh
script because it was installing a newer version (0.16) than OAS supports
~$ git clone -b v0.6 https://open.greenhost.net/openappstack/openappstack.git
Cloning into 'openappstack'...
remote: Enumerating objects: 14611, done.
remote: Counting objects: 100% (157/157), done.
remote: Compressing objects: 100% (81/81), done.
opremote: Total 14611 (delta 99), reused 101 (delta 68), pack-reused 14454
Receiving objects: 100% (14611/14611), 49.95 MiB | 18.47 MiB/s, done.
Resolving deltas: 100% (8740/8740), done.
~$ cd openappstack/
~/openappstack$ python3 -m venv env
~/openappstack$ . env/bin/activate
~/openappstack$ pip3 install -r requirements.txt
Here wheel
fails
...
Collecting wheel==0.36.2
Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Requirement already satisfied: setuptools>=40.3.0 in ./env/lib/python3.8/site-packages (from google-auth==1.32.1->-r requirements.txt (line 35)) (44.0
.0)
Building wheels for collected packages: ansible
Building wheel for ansible (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ana/openappstack/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uly1b8re/ansible/setup
.py'"'"'; __file__='"'"'/tmp/pip-install-uly1b8re/ansible/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"
'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-npb0b6kz
cwd: /tmp/pip-install-uly1b8re/ansible/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for ansible
Running setup.py clean for ansible
Failed to build ansible
Installing collected packages: pytz, certifi, charset-normalizer,
...
I install it "manually"
~/openappstack$ pip install wheel
Requirement already satisfied: wheel in ./env/lib/python3.8/site-packages (0.36.2)
~/openappstack$ pip3 install -r requirements.txt
~/openappstack$ python -m openappstack oas.domain.org create oas.domain.org --ip-address 1.2.3.4
No --create-hostname provided, using cluster name "oas.domain.org"
Created /home/ana/openappstack/clusters/oas.domain.org/inventory.yml
Created /home/ana/openappstack/clusters/oas.domain.org/.cluster.env
~/openappstack$ cp install/.flux.env.example clusters/oas.domain.org/.flux.env
~/openappstack$ vim clusters/oas.domain.org/.flux.env
~/openappstack$ python -m openappstack oas.domain.org install
~/openappstack$ export CLUSTER_DIR=clusters/oas.domain.org
~/openappstack$ cp install/kustomization.yaml $CLUSTER_DIR/
~/openappstack$ # Tell kubectl to use your cluster's kube_config
~/openappstack$ export KUBECONFIG=$CLUSTER_DIR/kube_config_cluster.yml
~/openappstack$ # This inserts the configuration from .flux.env into your cluster as a "secret"
~/openappstack$ kubectl apply -k $CLUSTER_DIR
secret/oas-cluster-variables created
~/openappstack$ ./install/install-openappstack.sh
✚ generating manifests
✔ manifests build completed
► installing components in flux-system namespace
◎ verifying installation
✔ helm-controller: deployment ready
✔ notification-controller: deployment ready
✔ source-controller: deployment ready
✔ kustomize-controller: deployment ready
✔ install finished
Tracking branch v0.6 for https://open.greenhost.net/openappstack/openappstack flux repo
✚ generating GitRepository source
► applying GitRepository source
✔ GitRepository source created
◎ waiting for GitRepository source reconciliation
✔ GitRepository source reconciliation completed
✔ fetched revision: v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18
✚ generating Kustomization
► applying Kustomization
✔ Kustomization created
◎ waiting for Kustomization reconciliation
✔ Kustomization openappstack is ready
✔ applied revision v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18
~/openappstack$ install/install-nextcloud.sh
✚ generating Kustomization
► applying Kustomization
✔ Kustomization created
◎ waiting for Kustomization reconciliation
✔ Kustomization add-nextcloud is ready
✔ applied revision v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18
After this I log in int oas.domain.org
and I get
# flux get kustomization
NAME READY MESSAGE REVISION SUSPENDED
openappstack True Applied revision: v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 False
infrastructure True Applied revision: v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 False
add-nextcloud True Applied revision: v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 False
core True Applied revision: v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 v0.6/af0af85f200b3a481d7fc49e0a158b5c4e1cbf18 False
monitoring False var substitution failed for 'kube-prometheus-stack': YAMLToJSON: yaml: line 32: found character that cannot start any token False
nextcloud False var substitution failed for 'nextcloud': YAMLToJSON: yaml: line 84: found character that cannot start any token False
Nextcloud is not running. Running some test
$~/openappstack$ py.test -s --ansible-inventory=${CLUSTER_DIR}/inventory.yml --hosts='ansible://*'
============================================================== short test summary info ===============================================================
FAILED ansible/pytest/test_prometheus.py::test_prometheus_alerts[ansible://oas.domain.org] - AssertionError: Unexpected exit code 6 for Comma...
FAILED test/pytest/test_app_deployments.py::test_kustomizations - AssertionError: Error: 1 kustomizations not 'ready'!
FAILED test/pytest/test_app_deployments.py::test_helmreleases - AssertionError: Error: 8 apps not 'deployed'!
FAILED test/pytest/test_certs.py::test_cert_validation[ansible://oas.domain.org] - FileNotFoundError: [Errno 2] No such file or directory: 'p...
FAILED test/pytest/test_prometheus.py::test_prometheus_alerts[ansible://oas.domain.org] - AssertionError: Unexpected exit code 6 for CommandR...
ERROR ansible/pytest/test_app_deployments.py::test_kustomizations
ERROR ansible/pytest/test_app_deployments.py::test_helmreleases
ERROR ansible/pytest/test_app_deployments.py::test_apps_running
ERROR ansible/pytest/test_certs.py::test_cert_validation[ansible://oas.domain.org]
================================================= 5 failed, 5 passed, 12 warnings, 4 errors in 7.40s =================================================
Edited by Ana Aviles