Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Setup-Manager
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
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
Dmytro Bogatov
Setup-Manager
Commits
afd5b9f3
Commit
afd5b9f3
authored
1 year ago
by
Dmytro Bogatov
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade cluster.
parent
e8797434
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#53500
passed
1 year ago
Stage: deploy
Changes
2
Pipelines
22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
infra/script.sh
+8
-5
8 additions, 5 deletions
infra/script.sh
infra/set-dns.sh
+1
-1
1 addition, 1 deletion
infra/set-dns.sh
with
9 additions
and
6 deletions
infra/script.sh
+
8
−
5
View file @
afd5b9f3
...
...
@@ -23,7 +23,7 @@ get_gcp_k8s_version () {
local
REGEX
=
'[0-9]\.([0-9]+).*'
VERSION
=
$1
gcloud container get-server-config
--zone
=
us-central1-f
--format
=
json
\
gcloud container get-server-config
--zone
=
$REGION
-
$ZONE
--format
=
json
\
| jq
-r
'.channels[1].validVersions[]'
\
|
while
read
version
do
...
...
@@ -55,8 +55,11 @@ CERTDIRPATH=$1
PROJECT
=
$2
STATUSSITECONFIG
=
$CERTDIRPATH
/appsettings.production.yml
TIMESTAMP
=
$(
date
+%s
)
# TIMESTAMP=$(date +%s)
TIMESTAMP
=
"1691077967"
VERSION
=
"23"
REGION
=
"us-east1"
ZONE
=
"b"
APIKEY
=
$(
cat
$STATUSSITECONFIG
|
grep
"ApiKey:"
|
cut
-d
'"'
-f
2
)
SERVICEACC
=
"admin-acc-
$TIMESTAMP
"
...
...
@@ -76,7 +79,7 @@ echo "Enabling K8S API, may take a while..."
gcloud services
enable
container.googleapis.com
--project
"
$PROJECT
"
gcloud beta container
--project
"
$PROJECT
"
clusters create
"websites-
$TIMESTAMP
"
\
--zone
"us-central1-a"
\
--zone
$REGION
-
$ZONE
\
--no-enable-basic-auth
\
--cluster-version
"
$k8s_version
"
\
--release-channel
"None"
\
...
...
@@ -92,7 +95,7 @@ gcloud beta container --project "$PROJECT" clusters create "websites-$TIMESTAMP"
--monitoring
=
SYSTEM
\
--enable-ip-alias
\
--network
"projects/
$PROJECT
/global/networks/default"
\
--subnetwork
"projects/
$PROJECT
/regions/
us-central1
/subnetworks/default"
\
--subnetwork
"projects/
$PROJECT
/regions/
$REGION
/subnetworks/default"
\
--no-enable-intra-node-visibility
\
--addons
HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver
\
--no-enable-autoupgrade
\
...
...
@@ -100,7 +103,7 @@ gcloud beta container --project "$PROJECT" clusters create "websites-$TIMESTAMP"
# clear other clusters from config
rm
~/.kube/config
gcloud container clusters get-credentials
"websites-
$TIMESTAMP
"
--zone
us-central1-a
--project
"
$PROJECT
"
gcloud container clusters get-credentials
"websites-
$TIMESTAMP
"
--zone
$REGION
-
$ZONE
--project
"
$PROJECT
"
gcloud services
enable
cloudresourcemanager.googleapis.com
--project
"
$PROJECT
"
gcloud beta iam service-accounts create
$SERVICEACC
--project
"
$PROJECT
"
...
...
This diff is collapsed.
Click to expand it.
infra/set-dns.sh
+
1
−
1
View file @
afd5b9f3
...
...
@@ -7,7 +7,7 @@ set -e
source
sources/data.sh
source
.secret.sh
VALUES
=(
"34.
30.186.254
"
)
VALUES
=(
"34.
138.245.221
"
)
echo
"Values are
${
VALUES
[*]
}
"
#
...
...
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