Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
status-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmytro Bogatov
status-site
Commits
94c9f643
Verified
Commit
94c9f643
authored
Oct 17, 2018
by
Dmytro Bogatov
💕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Complete K8S migration.
parent
c1d81b44
Pipeline
#2510
failed with stages
in 11 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
6 deletions
+50
-6
articles/docs/configuration.md
articles/docs/configuration.md
+2
-2
articles/docs/deployment.md
articles/docs/deployment.md
+42
-1
build.sh
build.sh
+1
-1
deployment/sources/service/deployment-database.yaml
deployment/sources/service/deployment-database.yaml
+2
-0
deployment/sources/volume-claim.yaml
deployment/sources/volume-claim.yaml
+3
-2
No files found.
articles/docs/configuration.md
View file @
94c9f643
<!-- cSpell:ignore SDKJF 5432 SMDFKL sdahjdjhd _678 ajsdvbja asgfdk _876 ajhsvdjh yourdomain logmessage -->
<!-- cSpell:ignore SDKJF 5432 SMDFKL sdahjdjhd
Kubernetes
_678 ajsdvbja asgfdk _876 ajhsvdjh yourdomain logmessage -->
# Configuration
...
...
@@ -28,7 +28,7 @@ Configuration is built in the `Startup` method and is available for [Dependency
## User perspective
It is required to supply
`appsettings.yml`
file as a
*docker secret*
launching the application with
`docker stack deploy`
.
It is required to supply
`appsettings.yml`
file as a
*docker secret*
when deploying the application to Kubernetes
.
Please, refer to
[
Deployment section
](
/deployment/
)
to download example config and supply it as docker secret.
<!-- When [deploying with script](deployment/) it is possible to supply *example configuration* to get app up and running. -->
<!-- Then user is free to change the configuration and restart the app. -->
...
...
articles/docs/deployment.md
View file @
94c9f643
<!-- cSpell:ignore Kubernetes -->
# Deployment
## Deploy to swarm (preferred way)
## Kubernetes
Officially supported deployment strategy is using Kubernetes.
Please, see
[
Kubernetes docs
](
https://kubernetes.io/
)
.
I have to assume some basic experience with Kubernetes.
You can deploy most of the system right away with the following command
kubectl apply -f https://git.dbogatov.org/dbogatov/status-site/-/jobs/artifacts/master/raw/deployment/config.yaml?job=release-deployment
You also need to supply your settings
kubectl create secret -n status-site generic appsettings.production.yml --from-file=/path/to/config.yaml
where your settings reside in
`/path/to/config.yaml`
.
This will download the config file from CI and apply it against your cluster.
It is recommended to inspect the file before applying it for security considerations.
This config creates a namespace
`status-site`
and creates resources within it.
It creates tuples deployment-service for each part of the system.
Components are designed to communicate with each other by names provided in config.
Each component also gets
`appsettings`
secret mounted as volume.
Lastly, database needs a stable persistent storage, so config include Persistent Volume Claim for 10 GB.
It is cluster administrator's responsibility to provide Volumes that meet claims.
You may adjust the claim's capacity if needed.
By default, all services are not replicated (i.e. replication factor 1).
You may want to adjust this parameter.
Be careful, though.
The only components that are safe to replicate are
`docs`
,
`ping`
and
`web`
.
If
`web`
is replicated you may have issues with authorization, as one replica generated the cookie and another one does not recognize it.
I am working on this issue.
## LEGACY: Deploy to swarm (preferred way)
> This is the old way to deploy the system.
> It is not officially supported, but will likely work.
Status site is designed with swarm in mind.
The preferred way to deploy the system is using
`docker stack deploy`
command.
...
...
build.sh
View file @
94c9f643
...
...
@@ -308,7 +308,7 @@ build-deployment () {
mv
services/namespace.yaml config.yaml
cat
services/
**
/
*
.yaml
>>
config.yaml
cat
sources/volume-claim.yaml
>>
config.yaml
}
## DEBIAN PACKAGE
...
...
deployment/sources/service/deployment-database.yaml
View file @
94c9f643
...
...
@@ -30,6 +30,8 @@ spec:
value
:
"
statususer"
-
name
:
POSTGRES_PASSWORD
value
:
"
relyOn1InternalSwarmNetwork"
-
name
:
PGDATA
value
:
"
/var/lib/postgresql/data/db-files/"
volumes
:
-
name
:
database-persistent-storage
persistentVolumeClaim
:
...
...
deployment/sources/volume-claim.yaml
View file @
94c9f643
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
...
...
@@ -8,6 +9,6 @@ spec:
-
ReadWriteOnce
resources
:
requests
:
storage
:
5
Gi
storageClassName
:
do-block-storage
storage
:
10
Gi
#
storageClassName: do-block-storage
---
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment