Skip to content

Commit

Permalink
geting closer
Browse files Browse the repository at this point in the history
  • Loading branch information
tztz8 committed Jun 7, 2023
1 parent 9cb134e commit 29d5bc4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
26 changes: 21 additions & 5 deletions helper_scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@ Install

- [ ] Install libs (`openssl`)
```shell
sudo dnf update
sudo dnf install openssl mariadb-connector-c
sudo yum update
# TODO: get openssl 3
sudo yum install openssl openssl-libs
sudo amazon-linux-extras enable mariadb10.5
sudo yum clean metadata
sudo yum install mariadb-libs
```
> mariadb-connector-c ?
- [ ] Setup server user (`status-reports`)
```shell
sudo useradd -m -s /usr/sbin/nologin status-reports
sudo useradd -m status-reports
```
- [ ] Get server
```shell
# TODO: download https://github.com/tztz8/EWU-CSCD488-490-Senior-Project/releases
# unzip
tar -xvzf bin.tar.gz
```
- [ ] Copy server into user (`/home/status-reports/server`)
```shell
Expand All @@ -30,15 +41,16 @@ sudo cp target/release/backend /home/status-reports/server/
sudo cp target/release/dbcli /home/status-reports/server/
sudo cp -r database/migrations /home/status-reports/server/
sudo cp helper_scripts/srs-actix.service /home/status-reports/server/
# TODO: make link (/etc/systemd/system/)
sudo cp helper_scripts/run.sh /home/status-reports/server
sudo cp -r studentpage/dist /home/status-reports/server/studentpage/
sudo cp -r adminpage/dist /home/status-reports/server/adminpage/
sudo cp -r res /home/status-reports/server/
# TODO: Wait for IT to config server
sudo cp secret.config.toml /home/status-reports/server/
sudo cp server.config.toml /home/status-reports/server/

sudo chown -R status-reports:status-reports /home/status-reports/server/
sudo systemctl link /home/status-reports/server/srs-actix.service
```
- [ ] Copy SSL cert into user (`/home/status-reports/server`)
```shell
Expand All @@ -55,6 +67,10 @@ sudo su - status-reports -c "chmod 400 /home/status-reports/server/privkey.pem"
```
- [ ] Setup DB
Code missing
- [ ] Lock server user
```shell
sudo usermod -s /usr/sbin/nologin status-reports
```
- [ ] Make `srs-actix.service` file
```unit file (systemd)
[Unit]
Expand All @@ -78,7 +94,7 @@ WantedBy=multi-user.target
- [ ] Start server
```shell
sudo systemctl start srs-actix
sudo systemctl status actix
sudo systemctl status srs-actix
```

### TODO: Want
Expand Down
2 changes: 1 addition & 1 deletion helper_scripts/srs-actix.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Description=Status Repoting System Server in Rust actix
After=network.target
#After=mysqld.service # Uncomment when using mysql on same server
StartLimitIntervalSec=0
#StartLimitIntervalSec=0

[Service]
Type=simple
Expand Down

0 comments on commit 29d5bc4

Please sign in to comment.