Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team5 Sports League application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue 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
Haoyu Sun
Team5 Sports League application
Commits
1ed0cc96
Commit
1ed0cc96
authored
4 months ago
by
Xiemuqing Xiao
Browse files
Options
Downloads
Patches
Plain Diff
Merge remote-tracking branch 'origin/main'
parent
727ee276
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Terraform/serverJenkins.sh
+25
-13
25 additions, 13 deletions
Terraform/serverJenkins.sh
with
25 additions
and
13 deletions
Terraform/serverJenkins.sh
+
25
−
13
View file @
1ed0cc96
...
@@ -7,12 +7,12 @@ echo logged in as $USER.
...
@@ -7,12 +7,12 @@ echo logged in as $USER.
echo
in
directory
$PWD
echo
in
directory
$PWD
echo
"installing MariaDB..."
#
echo "installing MariaDB..."
# sudo yum install mysql -y
#
# sudo yum install mysql -y
sudo
dnf
install
mariadb-server
-y
#
sudo dnf install mariadb-server -y
sudo
systemctl start mariadb
#
sudo systemctl start mariadb
sudo
systemctl status mariadb
#
sudo systemctl status mariadb
sudo
systemctl
enable
mariadb
#
sudo systemctl enable mariadb
echo
"creating mysql_secure_installation.txt..."
echo
"creating mysql_secure_installation.txt..."
...
@@ -41,12 +41,9 @@ sudo dnf update openssh-server openssh-client -y
...
@@ -41,12 +41,9 @@ sudo dnf update openssh-server openssh-client -y
echo
"needs to be in root account"
echo
"needs to be in root account"
cd
root
cd
root
touch
.ssh/known_hosts
ssh-keyscan git.cardiff.ac.uk
>>
.ssh/known_hosts
chmod
644 .ssh/known_hosts
echo
"now needs to be in rocky user directory"
echo
"now needs to be in rocky user directory"
cd
sports-league-application
cd
/home/rocky
cat
<<
`
EOF
`
>>
matrix_keypair.key
cat
<<
`
EOF
`
>>
matrix_keypair.key
-----BEGIN
OPENSSH PRIVATE KEY-----
-----BEGIN
OPENSSH PRIVATE KEY-----
...
@@ -88,12 +85,27 @@ TBXGOnjcHM0kCN4cQcT7YgnEtrt1SEt/yVK590Z+hSkaJIgPxUlDrm3UCkHFrKxdT+UCDL
...
@@ -88,12 +85,27 @@ TBXGOnjcHM0kCN4cQcT7YgnEtrt1SEt/yVK590Z+hSkaJIgPxUlDrm3UCkHFrKxdT+UCDL
/sHf7dEAE5USKzAAAAHElEK2MyMjEyMjE5MkBEU0E4Q0U5RUU2MEFCRjgBAgMEBQY
=
/sHf7dEAE5USKzAAAAHElEK2MyMjEyMjE5MkBEU0E4Q0U5RUU2MEFCRjgBAgMEBQY
=
-----END
OPENSSH PRIVATE KEY-----
-----END
OPENSSH PRIVATE KEY-----
`
EOF
`
`
EOF
`
chmod
400 matrix_keypair.key
ssh-agent bash
-c
'ssh-add matrix_keypair.key; git clone git@git.cardiff.ac.uk:c24020257/sports-league-application.git'
sudo chmod
400 matrix_keypair.key
sudo
ssh-agent bash
-c
'ssh-add matrix_keypair.key'
cd
~/
sudo touch
.ssh/known-hosts
#touch .ssh/known_hosts
sudo
ssh-keyscan git.cardiff.ac.uk
>>
.ssh/known_hosts
sudo chmod
644 .ssh/known_hosts
cd
/home/rocky
echo
"Cloning Git Repo..."
sudo
ssh-agent bash
-c
'ssh-add matrix_keypair.key; git clone git@git.cardiff.ac.uk:c24020257/sports-league-application.git'
echo
"Entering Git Repo directory..."
cd
sports-league-application
cd
sports-league-application
echo
"installing MariaDB..."
# sudo yum install mysql -y
sudo
dnf
install
mariadb-server
-y
sudo
systemctl start mariadb
sudo
systemctl status mariadb
sudo
systemctl
enable
mariadb
mysql
-uroot
-pcomsc
< src/main/resources/sports.sql
mysql
-uroot
-pcomsc
< src/main/resources/sports.sql
...
...
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