-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,22 @@ cd - | |
## setup dev environment | ||
|
||
```shell | ||
$ git config --global url."[email protected]:".insteadOf "https://gitlab.ricebook.net/" | ||
$ go get gitlab.ricebook.net/platform/core.git | ||
$ mv $GOPATH/src/gitlab.ricebook.net/platform/core.git $GOPATH/src/gitlab.ricebook.net/platform/core | ||
$ cd $GOPATH/src/gitlab.ricebook.net/platform/core && go install | ||
$ ln -s $GOPATH/src/gitlab.ricebook.net/platform/core $MY_WORK_SPACE/eru-core2 | ||
$ make deps | ||
git config --global url."[email protected]:".insteadOf "https://gitlab.ricebook.net/" | ||
go get gitlab.ricebook.net/platform/core.git | ||
mv $GOPATH/src/gitlab.ricebook.net/platform/core.git $GOPATH/src/gitlab.ricebook.net/platform/core | ||
cd $GOPATH/src/gitlab.ricebook.net/platform/core | ||
make deps | ||
make build | ||
``` | ||
|
||
## Upgrade core on test/production server | ||
|
||
```shell | ||
make build | ||
# test server | ||
devtools/upgrade-eru-core.sh test eru-core | ||
# prod server | ||
devtools/upgrade-eru-core.sh | ||
``` | ||
|
||
### GRPC | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
ssh [email protected] -t 'sudo yum --enablerepo=ricebook clean metadata' | ||
ssh [email protected] -t 'sudo yum reinstall -y eru-core' | ||
ssh [email protected] -t 'sudo systemctl daemon-reload' | ||
ssh [email protected] -t 'sudo systemctl restart eru-core.service' | ||
ssh [email protected] -t 'sudo git --work-tree=/opt/citadel --git-dir=/opt/citadel/.git pull' | ||
ssh [email protected] -t 'sudo systemctl restart citadel' | ||
if [ $1 == "test" ]; then | ||
rsync -a /Users/timfeirg/gocode/src/gitlab.ricebook.net/platform/core sa-ricebook:~ | ||
ssh sa-ricebook -t 'sudo rm -rf /root/.go/src/gitlab.ricebook.net/platform/core' | ||
ssh sa-ricebook -t 'sudo mv ~/core /root/.go/src/gitlab.ricebook.net/platform/core' | ||
# ssh zzz1 -t 'sudo mv eru-core /usr/bin/eru-core' | ||
# ssh zzz1 -t 'sudo systemctl restart eru-core.service' | ||
else | ||
ssh [email protected] -t 'sudo yum --enablerepo=ricebook clean metadata' | ||
ssh [email protected] -t 'sudo yum reinstall -y eru-core' | ||
ssh [email protected] -t 'sudo systemctl daemon-reload' | ||
ssh [email protected] -t 'sudo systemctl restart eru-core.service' | ||
ssh [email protected] -t 'sudo git --work-tree=/opt/citadel --git-dir=/opt/citadel/.git pull' | ||
ssh [email protected] -t 'sudo systemctl restart citadel' | ||
fi |