Last commits
parent
893a5a492a
commit
2651ff111c
|
@ -2,7 +2,6 @@
|
|||
|
||||
set -x
|
||||
set -e
|
||||
PASSWD_FILE=/home/narenas/passwd
|
||||
DIR=/ubuntu_scratch
|
||||
CHROOT_DIR=$DIR/chroot
|
||||
UBUNTU_CHROOT_DIR=$DIR/ubuntu_chroot
|
||||
|
|
|
@ -8,3 +8,5 @@ operations:
|
|||
- git
|
||||
- isc-dhcp-client
|
||||
- jq
|
||||
- network-manager
|
||||
- openssh-server
|
||||
|
|
|
@ -218,7 +218,7 @@ set_pkg_configuration
|
|||
install_mesa_repo
|
||||
install_non_interactive
|
||||
install_packages sudo ubuntu-standard sudo casper dbus-bin mesa-utils mesa-vulkan-drivers discover isc-dhcp-client laptop-detect unzip os-prober network-manager net-tools wireless-tools wpagui locales grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common grub-efi-amd64-signed shim-signed mtools binutils virtualbox-guest-utils virtualbox-guest-x11 python3-xdg
|
||||
install_non_interactive sddm openbox plymouth calamares terminator pcmanfm yad qml-modules*
|
||||
install_non_interactive sddm openbox plymouth calamares terminator pcmanfm yad qml-module*
|
||||
install_no_recommends linux-image-generic auditd
|
||||
set_root_passwd
|
||||
configure_divert
|
||||
|
@ -233,3 +233,4 @@ create_image
|
|||
configure_grub_menu
|
||||
create_image2
|
||||
clean
|
||||
|
||||
|
|
|
@ -19,31 +19,6 @@ function install_docker() {
|
|||
}
|
||||
|
||||
function install_ogcore_docker() {
|
||||
# Leer el JSON y extraer los valores con jq
|
||||
user=$(jq -r '.username' /opt/opengnsys/ogCore/installer/config.json)
|
||||
password=$(jq -r '.password' /opt/opengnsys/ogCore/installer/config.json)
|
||||
ogcore_version=$(jq -r '.container_version' /opt/opengnsys/ogCore/installer/config.json)
|
||||
|
||||
# Exportar los valores como variables de entorno
|
||||
export USER_NAME="$user"
|
||||
export USER_PASSWORD="$password"
|
||||
cd /opt/opengnsys/ogCore/repo
|
||||
git checkout develop
|
||||
docker compose up --build -d
|
||||
docker exec ogcore-php composer install
|
||||
docker exec ogcore-php php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
docker exec ogcore-php php bin/console doctrine:migrations:migrate --no-interaction
|
||||
docker exec ogcore-php php bin/console doctrine:fixtures:load --no-interaction
|
||||
|
||||
curl -k -X 'POST' \
|
||||
'https://localhost:8443/auth/login' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"username\": \"$USER_NAME\",
|
||||
\"password\": \"$USER_PASSWORD\"
|
||||
}"
|
||||
docker compose down
|
||||
cat <<EOF > /etc/systemd/system/ogcore.service
|
||||
[Unit]
|
||||
Description=Servicio para ejecutar Docker Compose de ogCore
|
||||
|
@ -52,7 +27,7 @@ Requires=docker.service
|
|||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/opengnsys/ogCore/repo/
|
||||
ExecStart=/usr/bin/docker compose up -d
|
||||
ExecStart=/usr/bin/docker compose -f docker-compose-deploy.yml up
|
||||
ExecStop=/usr/bin/docker compose down
|
||||
Restart=always
|
||||
|
||||
|
@ -61,9 +36,10 @@ WantedBy=multi-user.target
|
|||
EOF
|
||||
|
||||
systemctl enable ogcore
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function install_oggui_docker() {
|
||||
# Leer el JSON y extraer los valores con jq
|
||||
ogcore_ip=$(jq -r '.ogcore_ip' /opt/opengnsys/ogGui/installer/config.json)
|
||||
|
@ -130,7 +106,7 @@ do
|
|||
ogCore)
|
||||
echo "Instalando ogCore..."
|
||||
git clone "$OGCORE_REPO" "$component_dir/repo"
|
||||
echo - ogCore >> /etc/issueq
|
||||
echo - ogCore >> /etc/issue
|
||||
install_docker
|
||||
install_ogcore_docker
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
docker compose exec php composer install
|
||||
docker compose exec php php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
docker compose exec php php bin/console doctrine:migrations:migrate --no-interaction
|
||||
docker compose exec php php bin/console doctrine:fixtures:load --no-interaction
|
Loading…
Reference in New Issue