Skip to content

Commit b66cbe9

Browse files
committed
Add gocd db configuration to use postgresql and show info for manual web configuration in dashboard
1 parent 280cf68 commit b66cbe9

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

servers/gocd.sh

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,32 @@ gocd_after_install() {
9898

9999
sudo -u postgres psql -c GRANT ALL PRIVILEGES ON DATABASE "gocd" TO "${gocd_database_user}";
100100

101-
## TODO → Actualmente se usa así en el servidor de pruebas, no debe ser SUPERUSER
101+
## TOFIX → Actualmente se usa así en el servidor de pruebas, no debe ser SUPERUSER
102102
sudo -u postgres psql -c ALTER ROLE "${gocd_database_user}" SUPERUSER;
103103

104104

105-
106-
107-
105+
echo -e "$VE Configurando archivos de servidor para usar la nueva db$RO postgresql$CL"
106+
GO_SERVER_CONFIG='/usr/share/go-server/wrapper-config/wrapper-properties.conf'
107+
echo '## Database' | sudo tee -a GO_SERVER_CONFIG
108+
echo 'db.driver=org.postgresql.Driver' | sudo tee -a GO_SERVER_CONFIG
109+
echo "db.user=${gocd_database_user}" | sudo tee -a GO_SERVER_CONFIG
110+
echo "db.password=${gocd_database_password}" | sudo tee -a GO_SERVER_CONFIG
108111

109112

110113
# MENSAJES PARA HACER MANUALMENTE EN LA INTERFAZ
111114
# TODO → ESTO SE PUEDE HACER DESDE ARCHIVOS SEGURO, MIRAR
112-
Entrar a la url **/go/admin/security/auth_configs**
113-
id → file_authentication
114-
plugin id → Password File Authentication
115-
password file path → /etc/go/authentication
116-
Allow only known users to login → False
117-
118-
119-
Cambiar el directorio de artifacts en la configuración:
120-
:8153/go/admin/config/server#!artifact-management
115+
echo -e "$RO Ya solo queda configurar manualmente desde el dashboard las siguientes cosas:$CL"
116+
echo ""
117+
echo -e "$VE Entrar a la url$RO /go/admin/security/auth_configs$CL"
118+
echo -e "$VE id →$RO file_authentication$CL"
119+
echo -e "$VE plugin id →$RO Password File Authentication$CL"
120+
echo -e "$VE password file path →$RO /etc/go/authentication$CL"
121+
echo -e "$VE Allow only known users to login →$RO False$CL"
122+
echo ""
123+
echo -e "$VE Entrar en configuración y cambiar storage de artifacts al
124+
siguiente →$RO :8153/go/admin/config/server#!artifact-management$CL"
121125

126+
read -p " Pulse intro para terminar y volver al menú" nullparam
122127
}
123128

124129
gocd_installer() {
@@ -135,4 +140,8 @@ gocd_installer() {
135140

136141
gocd_install
137142
gocd_after_install
143+
144+
reiniciarServicio 'go-server'
145+
sleep 5
146+
reiniciarServicio 'go-agent'
138147
}

0 commit comments

Comments
 (0)