Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
billy clark committed Aug 11, 2022
2 parents 85b6834 + 27ed2f1 commit 1bf4733
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 297 deletions.
17 changes: 17 additions & 0 deletions docker/deployment/app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ spec:
labels:
app: app
spec:
affinity:
# required to ensure this container makes it to lfmerge's dedicated node
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: dedicated
operator: In
values:
- lfmerge
weight: 1
# required to ensure this container makes it to lfmerge's dedicated node
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: lfmerge
volumes:
- name: assets
persistentVolumeClaim:
Expand Down
17 changes: 17 additions & 0 deletions docker/deployment/lfmerge-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ spec:
app: lfmerge
spec:
affinity:
# required to ensure this container makes it to a dedicated node (so it doesn't crash other containers when it blows up)
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: dedicated
operator: In
values:
- lfmerge
weight: 1
# need to keep this on the same pod as the app since inotify only gets notification when updates occur on the same kernel
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
Expand All @@ -75,6 +86,12 @@ spec:
values:
- app
topologyKey: kubernetes.io/hostname
# required to ensure this container makes it to a dedicated node (so it doesn't crash other containers when it blows up)
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: lfmerge
volumes:
- name: sendreceive-data
persistentVolumeClaim:
Expand Down
8 changes: 4 additions & 4 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ Language Forge is built to run in a containerized environment. Kubernetes is ou

[qa.languageforge.org](https://qa.languageforge.org)

Staging deployments can be manually run with `VERSION_APP=<some-docker-tag-or-semver> VERSION_PROXY=<some-docker-tag-or-semver> VERSION_NEXT_APP=<some-docker-tag-or-semver> VERSION_LFMERGE=<some-docker-tag-or-semver> make deploy-staging`.

Current workflow:
1. merge PR into or make commits on `develop` branch
1. this will kick off the GHA (`.github/workflows/staging.yml`) to build, test and publish the necessary images to Docker Hub (https://hub.docker.com/r/sillsdev/web-languageforge/tags) and deploy this code to the staging environment at https://qa.languageforge.org

Staging deployments can be manually run with `VERSION_APP=<some-docker-tag-or-semver> VERSION_PROXY=<some-docker-tag-or-semver> VERSION_NEXT_APP=<some-docker-tag-or-semver> VERSION_LFMERGE=<some-docker-tag-or-semver> make deploy-staging`.

### Production ###

[languageforge.org](https://languageforge.org)

Production deployments can be manually run with `VERSION_APP=<some-docker-tag-or-semver> VERSION_PROXY=<some-docker-tag-or-semver> VERSION_NEXT_APP=<some-docker-tag-or-semver> VERSION_LFMERGE=<some-docker-tag-or-semver> make deploy-prod`.

Current workflow:
1. merge from `develop` into `master`
1. "Draft a new release" on https://github.com/sillsdev/web-languageforge/releases with a `vYYYY-MM-DD` tag format
1. "Publish" the new release
1. this will kick off the GHA (`.github/workflows/production.yml`) to build, test and publish the necessary images to Docker Hub (https://hub.docker.com/r/sillsdev/web-languageforge/tags) and deploy this code to the production environment at https://languageforge.org

Production deployments can be manually run with `VERSION_APP=<some-docker-tag-or-semver> VERSION_PROXY=<some-docker-tag-or-semver> VERSION_NEXT_APP=<some-docker-tag-or-semver> VERSION_LFMERGE=<some-docker-tag-or-semver> make deploy-prod`.

### Revert ###
Various tagged images are maintained in Docker Hub. If you need to revert to a previous version, you can do so by running the deployments scripts with the appropriate permissions or utilizing the Kubernetes UI to change the image of a deployment at any time.

Expand Down
172 changes: 110 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public static function updateEntry($projectId, $params, $userId, $mergeQueuePath
ActivityCommands::writeEntry($project, $userId, $entry, $action, $differences);

// SendReceiveCommands::queueProjectForUpdate($project, $mergeQueuePath);
// SendReceiveCommands::startLFMergeIfRequired($projectId, 'merge', $pidFilePath, $command);

return JsonEncoder::encode($entry);
}
Expand Down
Loading

0 comments on commit 1bf4733

Please sign in to comment.