Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iot-usecase-k8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
devops-usecase
iot-usecase-k8
Commits
27cc2e9f
Commit
27cc2e9f
authored
2 years ago
by
dehury
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml, manifest/.k8-deploy-apps.yml
parent
0c9bd636
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#13365
failed
2 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-5
5 additions, 5 deletions
.gitlab-ci.yml
manifest/.k8-deploy-apps.yml
+18
-18
18 additions, 18 deletions
manifest/.k8-deploy-apps.yml
with
23 additions
and
23 deletions
.gitlab-ci.yml
+
5
−
5
View file @
27cc2e9f
variables
:
hostpath
:
/home/centos/data/grafana
#
variables:
#
hostpath: /home/centos/data/grafana
#
include:
include
:
# - local: /k8-setup/.k8-setup.yml
#
- local: /manifest/.k8-deploy-apps.yml
-
local
:
/manifest/.k8-deploy-apps.yml
stages
:
-
setup-k8
#
- setup-k8
-
deploy-stage
...
...
This diff is collapsed.
Click to expand it.
manifest/.k8-deploy-apps.yml
+
18
−
18
View file @
27cc2e9f
...
...
@@ -9,37 +9,37 @@ deploy-job:
name
:
bitnami/kubectl:latest
entrypoint
:
[
"
"
]
before_script
:
-
kubectl config view
-
kubectl config use-context devops-usecase/iot-usecase-k8:agent2
-
kubectl config current-context
#
- kubectl config view
#
- kubectl config use-context devops-usecase/iot-usecase-k8:agent2
#
- kubectl config current-context
-
kubectl get nodes
-
kubectl get pods -n gitlab-kubernetes-agent
-
kubectl get pods -n default
#
- kubectl get pods -n gitlab-kubernetes-agent
#
- kubectl get pods -n default
script
:
# Create $NAMESPACE namespace if it does not exist.
-
kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
-
kubectl config set-context --current --namespace=$NAMESPACE
-
kubectl apply -f manifest/grafana/grafana-pv.yml
-
kubectl apply -f manifest/grafana/grafana.yml -n $NAMESPACE
#
script:
#
# Create $NAMESPACE namespace if it does not exist.
#
- kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
#
- kubectl config set-context --current --namespace=$NAMESPACE
#
- kubectl apply -f manifest/grafana/grafana-pv.yml
#
- kubectl apply -f manifest/grafana/grafana.yml -n $NAMESPACE
# I have defined the following variables in project -> setting -> CICD -> Variables
# INFLUXDB_DATABASE—the name of the database to use
# INFLUXDB_HOST—the hostname where the database server is running
# INFLUXDB_USERNAME—the username to log in with
# INFLUXDB_PASSWORD—the password to log in with
-
kubectl create secret generic influxdb-creds --from-literal=INFLUXDB_DATABASE=$INFLUXDB_DATABASE --from-literal=INFLUXDB_USERNAME=$INFLUXDB_USERNAME --from-literal=INFLUXDB_PASSWORD=$INFLUXDB_PASSWORD --from-literal=INFLUXDB_HOST=$INFLUXDB_HOST --dry-run=client -o yaml | kubectl apply -f -
-
kubectl apply -f manifest/influxdb/influxdb-pv.yml
-
kubectl apply -f manifest/influxdb/influxdb.yml -n $NAMESPACE
#
- kubectl create secret generic influxdb-creds --from-literal=INFLUXDB_DATABASE=$INFLUXDB_DATABASE --from-literal=INFLUXDB_USERNAME=$INFLUXDB_USERNAME --from-literal=INFLUXDB_PASSWORD=$INFLUXDB_PASSWORD --from-literal=INFLUXDB_HOST=$INFLUXDB_HOST --dry-run=client -o yaml | kubectl apply -f -
#
- kubectl apply -f manifest/influxdb/influxdb-pv.yml
#
- kubectl apply -f manifest/influxdb/influxdb.yml -n $NAMESPACE
# Installing the GraphDB database
-
kubectl apply -f manifest/graphdb/graphdb-pv.yml
-
kubectl apply -f manifest/graphdb/graphdb.yml -n $NAMESPACE
#
- kubectl apply -f manifest/graphdb/graphdb-pv.yml
#
- kubectl apply -f manifest/graphdb/graphdb.yml -n $NAMESPACE
# Installing the kubernetes dashboard
# - kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.0/aio/deploy/recommended.yaml
-
$(cat manifest/k8-dashboard/k8-dashboard.yml)
-
kubectl patch svc kubernetes-dashboard -n kubernetes-dashboard -p "$(cat manifest/k8-dashboard/patch-svcType.yml)"
#
- $(cat manifest/k8-dashboard/k8-dashboard.yml)
#
- kubectl patch svc kubernetes-dashboard -n kubernetes-dashboard -p "$(cat manifest/k8-dashboard/patch-svcType.yml)"
# - kubectl create serviceaccount admin-user -n kubernetes-dashboard --dry-run=client -o yaml | kubectl apply -f -
# - kubectl create clusterrolebinding admin-user -n kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:admin-user --dry-run=client -o yaml | kubectl apply -f -
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment