Merge branch 'main' of gitlab.com:domaindrivenarchitecture/c4k-gitea into main
This commit is contained in:
commit
a25b031789
10 changed files with 107 additions and 12 deletions
22
copy-and-build-dda-io.sh
Normal file
22
copy-and-build-dda-io.sh
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# set things
|
||||||
|
set -o nounset
|
||||||
|
set -o xtrace
|
||||||
|
set -o errexit
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
# dirs
|
||||||
|
srcDir="/home/$USER/"
|
||||||
|
srcName="main.js"
|
||||||
|
targetDir="/home/$USER/"
|
||||||
|
targetName="c4k-gitea.js"
|
||||||
|
|
||||||
|
echo "build"
|
||||||
|
shadow-cljs compile frontend
|
||||||
|
|
||||||
|
echo "move and rename file"
|
||||||
|
cp $srcDir$srcName $targetDir$targetName
|
||||||
|
|
||||||
|
echo "build"
|
||||||
|
(cd $targetDir; lein ring server)
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
1. apply backup-and-restore pod:
|
1. apply backup-and-restore pod:
|
||||||
`kubectl scale deployment backup-restore --replicas=1`
|
`kubectl scale deployment backup-restore --replicas=1`
|
||||||
2. exec into pod and execute restore pod (press tab to get your exact pod name)
|
2. exec into pod and execute backup pod (press tab to get your exact pod name)
|
||||||
`kubectl exec -it backup-restore-... -- /usr/local/bin/backup.sh`
|
`kubectl exec -it backup-restore-... -- /usr/local/bin/backup.sh`
|
||||||
3. remove backup-and-restore pod:
|
3. remove backup-and-restore pod:
|
||||||
`kubectl scale deployment backup-restore --replicas=0`
|
`kubectl scale deployment backup-restore --replicas=0`
|
||||||
|
|
|
@ -1,14 +1,43 @@
|
||||||
# stable release (should be done from master)
|
# Release process
|
||||||
|
|
||||||
|
## ... for testing (snapshots)
|
||||||
|
|
||||||
|
Make sure your clojars.org credentials are correctly set in your ~/.lein/profiles.clj file.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
git add .
|
||||||
|
git commit
|
||||||
```
|
```
|
||||||
#adjust [version]
|
|
||||||
vi package.json
|
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
lein deploy # or lein deploy clojars
|
||||||
|
```
|
||||||
|
|
||||||
|
## ... for stable release
|
||||||
|
|
||||||
|
Make sure tags are protected in gitlab:
|
||||||
|
Repository Settings -> Protected Tags -> set \*.\*.\* as tag and save.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
git checkout main # for old projects replace main with master
|
||||||
|
git add .
|
||||||
|
git commit
|
||||||
|
```
|
||||||
|
|
||||||
|
Open package.json, find ":version" keyword and remove "-SNAPSHOT" from version number.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
git add .
|
||||||
|
git commit -m "Release [version]"
|
||||||
lein release
|
lein release
|
||||||
git push --follow-tags
|
git push --follow-tags
|
||||||
|
```
|
||||||
|
|
||||||
# bump version - increase version and add -SNAPSHOT
|
Open package.json again, increase version increment by one and add "-SNAPSHOT".
|
||||||
vi package.json
|
|
||||||
|
``` bash
|
||||||
git commit -am "version bump"
|
git commit -am "version bump"
|
||||||
git push
|
git push
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Done.
|
||||||
|
|
21
doc/Upgrading.md
Normal file
21
doc/Upgrading.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Upgrading process
|
||||||
|
|
||||||
|
## adhoc (on kubernetes cluster)
|
||||||
|
|
||||||
|
Ssh into your kubernetes cluster running the gitea instance.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
kubectl edit configmap gitea-env
|
||||||
|
# make sure INSTALL_LOCK under security is set to true to disable the installation screen
|
||||||
|
# save and exit
|
||||||
|
kubectl edit deployments gitea
|
||||||
|
# search for your current gitea version, e.g. 1.17.0
|
||||||
|
# replace with new version
|
||||||
|
# save and exit
|
||||||
|
kubectl scale deployment gitea --replicas=0
|
||||||
|
kubectl scale deployment gitea --replicas=1
|
||||||
|
```
|
||||||
|
|
||||||
|
Logging into the admin account should now show the new version.
|
||||||
|
|
||||||
|
You may want to update your c4k-gitea resources to reflect the changes made on the cluster.
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "c4k-gitea",
|
"name": "c4k-gitea",
|
||||||
"description": "Generate c4k yaml for a gitea deployment.",
|
"description": "Generate c4k yaml for a gitea deployment.",
|
||||||
"author": "meissa GmbH",
|
"author": "meissa GmbH",
|
||||||
"version": "0.1.1-SNAPSHOT",
|
"version": "1.0.1-SNAPSHOT",
|
||||||
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-gitea#readme",
|
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-gitea#readme",
|
||||||
"repository": "https://www.npmjs.com/package/c4k-gitea",
|
"repository": "https://www.npmjs.com/package/c4k-gitea",
|
||||||
"license": "APACHE2",
|
"license": "APACHE2",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(defproject org.domaindrivenarchitecture/c4k-gitea "0.1.1-SNAPSHOT"
|
(defproject org.domaindrivenarchitecture/c4k-gitea "1.0.1-SNAPSHOT"
|
||||||
:description "gitea c4k-installation package"
|
:description "gitea c4k-installation package"
|
||||||
:url "https://domaindrivenarchitecture.org"
|
:url "https://domaindrivenarchitecture.org"
|
||||||
:license {:name "Apache License, Version 2.0"
|
:license {:name "Apache License, Version 2.0"
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
(br/validate! "app-name" ::gitea/default-app-name :optional true)
|
(br/validate! "app-name" ::gitea/default-app-name :optional true)
|
||||||
(br/validate! "domain-whitelist" ::gitea/service-domain-whitelist :optional true)
|
(br/validate! "domain-whitelist" ::gitea/service-domain-whitelist :optional true)
|
||||||
(br/validate! "volume-total-storage-size" ::gitea/volume-total-storage-size :deserializer js/parseInt)
|
(br/validate! "volume-total-storage-size" ::gitea/volume-total-storage-size :deserializer js/parseInt)
|
||||||
(br/validate! "auth" core/auth? :deserializer edn/read-string)
|
(br/validate! "auth" gitea/auth? :deserializer edn/read-string)
|
||||||
(br/set-form-validated!))
|
(br/set-form-validated!))
|
||||||
|
|
||||||
(defn add-validate-listener [name]
|
(defn add-validate-listener [name]
|
||||||
|
|
|
@ -18,6 +18,27 @@ spec:
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/entrypoint.sh"]
|
command: ["/entrypoint.sh"]
|
||||||
env:
|
env:
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres-secret
|
||||||
|
key: postgres-user
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres-secret
|
||||||
|
key: postgres-password
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: postgres-config
|
||||||
|
key: postgres-db
|
||||||
|
- name: POSTGRES_HOST
|
||||||
|
value: "postgresql-service:5432"
|
||||||
|
- name: POSTGRES_SERVICE
|
||||||
|
value: "postgresql-service"
|
||||||
|
- name: POSTGRES_PORT
|
||||||
|
value: "5432"
|
||||||
- name: AWS_DEFAULT_REGION
|
- name: AWS_DEFAULT_REGION
|
||||||
value: eu-central-1
|
value: eu-central-1
|
||||||
- name: AWS_ACCESS_KEY_ID_FILE
|
- name: AWS_ACCESS_KEY_ID_FILE
|
||||||
|
@ -31,6 +52,8 @@ spec:
|
||||||
key: restic-repository
|
key: restic-repository
|
||||||
- name: RESTIC_PASSWORD_FILE
|
- name: RESTIC_PASSWORD_FILE
|
||||||
value: /var/run/secrets/backup-secrets/restic-password
|
value: /var/run/secrets/backup-secrets/restic-password
|
||||||
|
- name: CERTIFICATE_FILE
|
||||||
|
value: ""
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: gitea-data-volume
|
- name: gitea-data-volume
|
||||||
mountPath: /var/backups
|
mountPath: /var/backups
|
||||||
|
|
|
@ -62,7 +62,7 @@ data:
|
||||||
GITEA__repository__TEMP_PATH: /data/gitea/uploads
|
GITEA__repository__TEMP_PATH: /data/gitea/uploads
|
||||||
|
|
||||||
#[security]
|
#[security]
|
||||||
GITEA__security__INSTALL_LOCK: "false"
|
GITEA__security__INSTALL_LOCK: "true"
|
||||||
|
|
||||||
#[server]
|
#[server]
|
||||||
GITEA__server__DOMAIN: FQDN
|
GITEA__server__DOMAIN: FQDN
|
||||||
|
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gitea
|
- name: gitea
|
||||||
image: gitea/gitea:1.17.0
|
image: gitea/gitea:1.17.3
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
# config settings
|
# config settings
|
||||||
envFrom:
|
envFrom:
|
||||||
|
|
Loading…
Reference in a new issue