Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
libre.sh
kubernetes
common
Commits
9d31348d
Commit
9d31348d
authored
3 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
Moves create_ns to its own func.
parent
5647f814
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
createLiiibre
+8
-10
8 additions, 10 deletions
createLiiibre
scripts/functions.sh
+6
-0
6 additions, 0 deletions
scripts/functions.sh
with
14 additions
and
10 deletions
createLiiibre
+
8
−
10
View file @
9d31348d
...
...
@@ -16,26 +16,24 @@ cd /root/domains
source
./common/scrips/functions.sh
export
DOMAIN
=
${
1
}
export
NUAGE_SUBDOMAIN
=
${
NUAGE_SUBDOMAIN
:-
nuage
}
export
CHAT_SUBDOMAIN
=
${
CHAT_SUBDOMAIN
:-
chat
}
export
NS
=
`
echo
${
1
}
|
sed
's/\./-/g'
`
# Create NS
mkdir
-p
${
NS
}
mkdir
-p
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
create_ns
# Create CHAT resources
export
CHAT_SUBDOMAIN
=
${
CHAT_SUBDOMAIN
:-
chat
}
mkdir
-p
${
NS
}
/
${
CHAT_SUBDOMAIN
}
echo export
APP
=
rocketchat
>
${
NS
}
/
${
CHAT_SUBDOMAIN
}
/.env
echo export
S3_ENDPOINT
=
https://hot-objects.liiib.re
>>
${
NS
}
/
${
CHAT_SUBDOMAIN
}
/.env
echo export
S3_ENDPOINT_COLD
=
https://cold-objects.liiib.re
>>
${
NS
}
/
${
CHAT_SUBDOMAIN
}
/.env
cp
./common/rocketchat/config.yaml
${
NS
}
/
${
CHAT_SUBDOMAIN
}
/
# Create NUAGE resources
export
NUAGE_SUBDOMAIN
=
${
NUAGE_SUBDOMAIN
:-
nuage
}
mkdir
-p
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
echo export
APP
=
nextcloud
>
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
/.env
echo export
S3_ENDPOINT
=
https://hot-objects.liiib.re
>>
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
/.env
echo export
S3_ENDPOINT_COLD
=
https://cold-objects.liiib.re
>>
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
/.env
cp
./common/rocketchat/config.yaml
${
NS
}
/
${
CHAT_SUBDOMAIN
}
/
kubectl create ns
${
NS
}
||
true
kubens
${
NS
}
kubectl
-n
${
NS
}
apply
-f
./common/networkpolicies.yml
cd
${
NS
}
/
${
NUAGE_SUBDOMAIN
}
libre apply ../../common/nextcloud/other-manifests/saml-cert.yaml
cd
../..
...
...
This diff is collapsed.
Click to expand it.
scripts/functions.sh
+
6
−
0
View file @
9d31348d
...
...
@@ -6,6 +6,12 @@ function create_bucket() {
mc admin policy
set
${
STORAGE_CLASS
}
username-rw
user
=
${
AWS_ACCESS_KEY_ID
}
}
function
create_ns
()
{
mkdir
-p
/root/domains/
${
NS
}
kubectl create ns
${
NS
}
||
true
kubectl
-n
${
NS
}
apply
-f
./common/networkpolicies.yml
}
function
pg_zero_lag
()
{
cat
/tmp/patronictl_list |tail
-n2
|
cut
-d
$'
\t
'
-f
7 |
grep
-q
0
}
...
...
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