10 Commits

Author SHA1 Message Date
2f02ddb79d Merge branch 'docs_label' of kosmos/gitea.kosmos.org into master 2019-08-12 11:38:11 +00:00
Greg Karékinian
90cb219d79 Change the color for the docs label to ead746 2019-08-12 13:27:41 +02:00
Greg Karékinian
9c36ebeb14 Add the docs label to the Kosmos label set 2019-08-09 16:06:01 +02:00
gregkare
5f3b80ab9e Merge branch 'deployment_api_version' of kosmos/gitea.kosmos.org into master 2019-08-07 09:20:50 +00:00
b00931352f Improve README 2019-08-06 13:16:07 +02:00
Greg Karékinian
f8d964f8d2 Bump the api version for the Deployment resource to apps/v1
It was previously set to extensions/v1beta1. I have discovered that when
the Deployment is created as a extensions/v1beta1, it causes the
existing pod to be killed immediately when doing a rolling update. When
the Deployment was created as apps/v1, a rolling update behaves as
expected: a new pod is created, and the old one is only terminated once
the new pod is ready to serve traffic.

The existing Deployment resource will need to be deleted and recreated:

    kubectl delete deployment gitea-server
    kubectl apply -f gitea-server.yaml

Applying the file without deleting it first will not fix the issue with
rolling updates. It will cause a short downtime
2019-08-06 12:44:57 +02:00
810482c755 Merge branch 'chore/30-update_1.9.0' of kosmos/gitea.kosmos.org into master 2019-08-02 15:59:38 +00:00
Greg Karékinian
4e225ab1af Update Gitea to 1.9.0
Closes #30
2019-08-02 17:34:28 +02:00
1f6e0b7d57 Merge branch 'feature/ark_to_velero' of kosmos/gitea.kosmos.org into master 2019-06-22 12:26:30 +00:00
Greg Karékinian
a3fa72bb56 Update the documentation, Ark is now Velero
Refs #27
2019-06-19 18:33:44 +02:00
7 changed files with 33 additions and 42 deletions

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "vendor/ark"]
path = vendor/ark
url = git@github.com:heptio/ark.git

View File

@@ -1,27 +1,26 @@
# gitea.kosmos.org # gitea.kosmos.org
This repository contains configuration files and other assets, that are used to This repository contains configuration files and other assets, that are used to
deploy and operate this Gitea instance. deploy and operate this Gitea instance. Feel free to [open
issues](https://gitea.kosmos.org/kosmos/gitea.kosmos.org/issues) for questions,
suggestions, bugs, to-do items, and whatever else you want to discuss or
resolve.
## Building & deploying
To create a new image containing the customizations: To create a new image containing the customizations:
Edit `packer/custom.json` to increment the tag, then run this script (needs Edit `packer/custom.json` to increment the tag, then run this script (needs
[Packer](https://www.packer.io/) in your path) [Packer](https://www.packer.io/) in your path)
```
./script/build_customizations_image ./script/build_customizations_image
```
Then edit `kubernetes/gitea-server.yaml` to use the new tag Then edit `kubernetes/gitea-server.yaml` to use the new tag
(`image: eu.gcr.io/fluted-magpie-218106/gitea_custom:$VERSION`) and apply the (`image: eu.gcr.io/fluted-magpie-218106/gitea_custom:$VERSION`) and apply the
change: change:
```
cd kubernetes
kubectl apply -f gitea-server.yaml
```
Feel free to [open issues] for questions, suggestions, bugs, to-do items, and cd kubernetes
whatever else you want to discuss or resolve. kubectl apply -f gitea-server.yaml
[open issues]: https://gitea.kosmos.org/kosmos/gitea.kosmos.org/issues

View File

@@ -1,4 +1,5 @@
#db231d bug ; Something is not working #db231d bug ; Something is not working
#ead746 docs ; Documentation
#76db1d enhancement ; Improving existing functionality #76db1d enhancement ; Improving existing functionality
#1d76db feature ; New functionality #1d76db feature ; New functionality
#db1d76 idea ; Something to consider #db1d76 idea ; Something to consider

View File

@@ -1,36 +1,28 @@
# Backups # Backups
We're using [Ark][1] for backing up Kubernetes config and GKE resources. It is We're using [Velero][1] (formerly Ark) for backing up Kubernetes config and GKE
available as a Git submodule in the `vendor/` folder (incl. the `ark` resources. It is available as a compiled binary for your platform [on GitHub][2]
executable).
In order to initialize and update submodules in your local repo, run once: The Velero service is running on the Sidamo cluster and was set up using the
[official docs' GCP instructions][3]. There's a daily backup
git submodule update --init
Then, to fetch/update the modules, run:
git submodule update
The Ark service is running on the Sidamo cluster and was set up using the
[official docs' GCP instructions and config files][4]. There's a daily backup
schedule in effect for Gitea (using the label `app=gitea`). schedule in effect for Gitea (using the label `app=gitea`).
Please refer to Ark's [ Getting Started ][5] doc for all backup and restore Please refer to Velero's [ Getting Started ][4] doc for all backup and restore
commands. commands.
## Backup location ## Backup location
Cluster configuration (including all live resources) is backed up to [a Google Cluster configuration (including all live resources) is backed up to [a Google
Cloud Storage container][3]. Cloud Storage container][5].
## Persistent volumes ## Persistent volumes
Persistent volumes are just GCE disks. Thus, with the current config, Ark Persistent volumes are just GCE disks. Thus, with the current config, Velero
creates volume snapshots as native [GCE disk snapshots][2]. creates volume snapshots as native [GCE disk snapshots][6].
[1]: https://heptio.github.io/ark/v0.10.0 [1]: https://velero.io/docs/v1.0.0
[2]: https://console.cloud.google.com/compute/snapshots?organizationId=772167872692&project=fluted-magpie-218106&tab=snapshots&snapshotssize=50 [2]: https://github.com/heptio/velero/releases/tag/v1.0.0
[3]: https://console.cloud.google.com/storage/browser/sidamo-backups?project=fluted-magpie-218106&organizationId=772167872692 [3]: https://velero.io/docs/v1.0.0/gcp-config/
[4]: https://heptio.github.io/ark/v0.10.0/gcp-config [4]: https://velero.io/docs/v1.0.0/about/
[5]: https://heptio.github.io/ark/v0.10.0/get-started [5]: https://console.cloud.google.com/storage/browser/sidamo-backups-new?project=fluted-magpie-218106&organizationId=772167872692
[6]: https://console.cloud.google.com/compute/snapshots?organizationId=772167872692&project=fluted-magpie-218106&tab=snapshots&snapshotssize=50

View File

@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: gitea-server name: gitea-server
@@ -6,6 +6,9 @@ metadata:
app: gitea app: gitea
spec: spec:
replicas: 1 replicas: 1
selector:
matchLabels:
app: gitea
template: template:
metadata: metadata:
labels: labels:
@@ -17,7 +20,7 @@ spec:
# This is a busybox image with our gitea customizations saved to # This is a busybox image with our gitea customizations saved to
# /custom, built using ./script/build_customizations_image from the # /custom, built using ./script/build_customizations_image from the
# root of the repo # root of the repo
image: eu.gcr.io/fluted-magpie-218106/gitea_custom:0.1 image: eu.gcr.io/fluted-magpie-218106/gitea_custom:0.1.2
command: [ command: [
'sh', '-c', 'sh', '-c',
'mkdir -p /data/gitea/conf && mkdir -p /data/gitea/https && cp /root/conf/app.ini /data/gitea/conf/app.ini && chown 1000:1000 /data/gitea/conf/app.ini && chmod 660 /data/gitea/conf/app.ini && cp /root/conf/*.pem /data/gitea/https && chmod 600 /data/gitea/https/*.pem && cp -R /custom/* /data/gitea && chown -R 1000:1000 /data/gitea' 'mkdir -p /data/gitea/conf && mkdir -p /data/gitea/https && cp /root/conf/app.ini /data/gitea/conf/app.ini && chown 1000:1000 /data/gitea/conf/app.ini && chmod 660 /data/gitea/conf/app.ini && cp /root/conf/*.pem /data/gitea/https && chmod 600 /data/gitea/https/*.pem && cp -R /custom/* /data/gitea && chown -R 1000:1000 /data/gitea'
@@ -29,7 +32,7 @@ spec:
name: config name: config
containers: containers:
- name: gitea-server - name: gitea-server
image: gitea/gitea:1.8.1 image: gitea/gitea:1.9.0
ports: ports:
- containerPort: 3000 - containerPort: 3000
- containerPort: 3001 - containerPort: 3001

View File

@@ -21,7 +21,7 @@
{ {
"type": "docker-tag", "type": "docker-tag",
"repository": "eu.gcr.io/fluted-magpie-218106/gitea_custom", "repository": "eu.gcr.io/fluted-magpie-218106/gitea_custom",
"tag": "0.1" "tag": "0.1.2"
}, },
"docker-push" "docker-push"
] ]

1
vendor/ark vendored

Submodule vendor/ark deleted from 0fd7872ef4