提交 8ba23f63 编写于 作者: F freesky-edward

Merge branch 'master' of gitee.com:openeuler/infrastructure

Listen 82
# May needed on old distributions or after an update from them.
#Listen 443
# Passenger defaults
PassengerSpawnMethod "smart"
PassengerMaxPoolSize 20
#RailsEnv "development"
# allow long request urls and being part of headers
LimitRequestLine 20000
LimitRequestFieldsize 20000
# Build Results
<VirtualHost *:82>
# The resulting repositories
DocumentRoot "/srv/obs/repos"
<Directory /srv/obs/repos>
Options Indexes FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
# NOTE
All script files in this folder used to start up the corresponding service in OBS cluster
All script files in this folder used to start up the corresponding service in OBS cluster,
There are some additional setup files (used in startup scripts) which are stored in the huawei object storage:
```
https://openeuler.obs.cn-south-1.myhuaweicloud.com:443/infrastructure/<file_name>
```
Remember to update them if required.
# Frontend
## Requirement
......@@ -104,6 +109,19 @@ the output would include:
var-cache-obs-worker.mount loaded active mounted /var/cache/obs/worker
obsworker.service loaded active running LSB: Open Build Service worker
```
# Cluster environment
```bash
Frontend: 172.16.1.81
Source: 172.16.1.89
Backend: 172.16.1.95
Worker1: 172.16.1.80
Worker2: 172.16.1.33
Worker3: 172.16.1.99
Worker4: 172.16.1.168
Worker5: 172.16.1.151
Worker6: 172.16.1.195
Worker7: 172.16.1.127
Worker8: 172.16.1.12
Worker9: 172.16.1.14
Worker10: 172.16.1.157
```
......@@ -95,6 +95,10 @@ sed -i "s/\$HOSTNAME/source.openeuler.org/g" /etc/slp.reg.d/obs.source_server.re
sed -i "s/After=network.target obssrcserver.service obsrepserver.service obsapisetup.service/After=network.target obssrcserver.service obsrepserver.service/g" /usr/lib/systemd/system/obsscheduler.service
systemctl daemon-reload
# Update the obs conf to setup up repo web server
cd /etc/apache2/vhosts.d
curl -o obs.conf https://openeuler.obs.cn-south-1.myhuaweicloud.com:443/infrastructure/obs.conf
echo "Updating the cluster hosts info"
# update hosts info:
# 1. <frontend_host> build.openeuler.org
......@@ -154,5 +158,8 @@ systemctl start obsdispatcher.service
systemctl start obspublisher.service
systemctl start obssigner.service
systemctl start obswarden.service
#Running repo web server
systemctl start apache2
echo "OBS backend server successfully started"
......@@ -69,10 +69,16 @@ systemctl stop obs-api-support.target
echo "Updating configuration file for apache service"
sed -i "s/source_host: localhost/source_host: source.openeuler.org/g" /srv/www/obs/api/config/options.yml
#TODO: update this into hostname when we finally has one
sed -i "s/frontend_host: localhost/frontend_host: ${frontend_host}/g" /srv/www/obs/api/config/options.yml
sed -i "s/ServerName api/ServerName build.openeuler.org/g" /etc/apache2/vhosts.d/obs.conf
sed -i "s/SSLCertificateFile \/srv\/obs\/certs\/server.crt/SSLCertificateFile \/srv\/obs\/certs\/fullchain.pem/g" /etc/apache2/vhosts.d/obs.conf
sed -i "s/SSLCertificateKeyFile \/srv\/obs\/certs\/server.key/SSLCertificateKeyFile \/srv\/obs\/certs\/privkey.pem/g" /etc/apache2/vhosts.d/obs.conf
#Updating the download url to point to backend server
#TODO: update this into hostname when we finally has one
sed -i "s/#{download_url}/https:\/\/${backend_host}:82/g" /srv/www/obs/api/app/views/webui2/shared/_download_repository_link.html.haml
# configure osc and api hostname
sed -i "s/our \$srcserver = \"http:\/\/\$hostname:5352\";/our \$srcserver = \"http:\/\/source.openeuler.org:5352\";/g" /usr/lib/obs/server/BSConfig.pm
......@@ -121,6 +127,9 @@ systemctl start obs-api-support.target
systemctl start mysql
systemctl start memcached
systemctl start apache2
echo "Restarting ts server for textual search engine"
rake ts:stop --trace RAILS_ENV="production"
rake ts:start --trace RAILS_ENV="production"
echo "OBS frontend server successfully started"
echo "Important, please update the administrator (Admin)'s password"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册