Merge pull request #17767 from antobinary/22.04-attempt-3
build: introducing bbb-graphql-server package
This commit is contained in:
commit
d0eb4f147e
3
.github/workflows/automated-tests.yml
vendored
3
.github/workflows/automated-tests.yml
vendored
@ -17,7 +17,7 @@ permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
build-install-and-test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: ./build/get_external_dependencies.sh
|
||||
@ -28,6 +28,7 @@ jobs:
|
||||
- run: ./build/setup.sh bbb-freeswitch-core
|
||||
- run: ./build/setup.sh bbb-freeswitch-sounds
|
||||
- run: ./build/setup.sh bbb-fsesl-akka
|
||||
- run: ./build/setup.sh bbb-graphql-server
|
||||
- run: ./build/setup.sh bbb-html5-nodejs
|
||||
- run: ./build/setup.sh bbb-html5
|
||||
- run: ./build/setup.sh bbb-learning-dashboard
|
||||
|
@ -101,6 +101,11 @@ bbb-html5-build:
|
||||
script:
|
||||
- build/setup-inside-docker.sh bbb-html5
|
||||
|
||||
bbb-graphql-server-build:
|
||||
extends: .build_job
|
||||
script:
|
||||
- build/setup-inside-docker.sh bbb-graphql-server
|
||||
|
||||
bbb-learning-dashboard-build:
|
||||
extends: .build_job
|
||||
script:
|
||||
|
@ -7,6 +7,7 @@ DEBNAME_TO_SOURCEDIR[bbb-export-annotations]="bbb-export-annotations"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-freeswitch-core]="freeswitch bbb-voice-conference"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-freeswitch-sounds]="do_not_copy_anything"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-fsesl-akka]="akka-bbb-fsesl bbb-common-message bbb-fsesl-client"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-graphql-server]="bbb-graphql-server"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-html5]="bigbluebutton-html5"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-html5-nodejs]="do_not_copy_anything"
|
||||
DEBNAME_TO_SOURCEDIR[bbb-learning-dashboard]="bbb-learning-dashboard"
|
||||
|
30
build/packages-template/bbb-graphql-server/after-install.sh
Executable file
30
build/packages-template/bbb-graphql-server/after-install.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
case "$1" in
|
||||
configure|upgrade|1|2)
|
||||
|
||||
fc-cache -f
|
||||
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'bigbluebutton'"
|
||||
sudo -u postgres psql -c "create database bigbluebutton"
|
||||
sudo -u postgres psql -U postgres -d bigbluebutton -a -f bbb_schema.sql --set ON_ERROR_STOP=on
|
||||
sudo -u postgres psql -c "create database hasura_app"
|
||||
echo "Postgresql configured"
|
||||
|
||||
# Apply BBB metadata in Hasura
|
||||
/usr/local/bin/hasura metadata apply
|
||||
|
||||
|
||||
systemctl enable bbb-graphql-server.service
|
||||
systemctl daemon-reload
|
||||
startService bbb-graphql-server || echo "bbb-graphql-server service could not be registered or started"
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
17
build/packages-template/bbb-graphql-server/after-remove.sh
Executable file
17
build/packages-template/bbb-graphql-server/after-remove.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
case "$1" in
|
||||
remove|failed-upgrade|abort-upgrade|abort-install|disappear|0|1)
|
||||
|
||||
;;
|
||||
purge)
|
||||
# remove Hasura
|
||||
rm -rf /usr/local/bin/hasura
|
||||
;;
|
||||
upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "postinst called with unknown argument $1" >&2
|
||||
;;
|
||||
esac
|
||||
|
3
build/packages-template/bbb-graphql-server/before-remove.sh
Executable file
3
build/packages-template/bbb-graphql-server/before-remove.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
stopService bbb-graphql-server || echo "bbb-graphql-server could not be unregistered or stopped"
|
56
build/packages-template/bbb-graphql-server/build.sh
Executable file
56
build/packages-template/bbb-graphql-server/build.sh
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
TARGET=`basename $(pwd)`
|
||||
|
||||
|
||||
PACKAGE=$(echo $TARGET | cut -d'_' -f1)
|
||||
VERSION=$(echo $TARGET | cut -d'_' -f2)
|
||||
DISTRO=$(echo $TARGET | cut -d'_' -f3)
|
||||
TAG=$(echo $TARGET | cut -d'_' -f4)
|
||||
BUILD=$1
|
||||
|
||||
#
|
||||
# Clean up directories
|
||||
rm -rf staging
|
||||
|
||||
#
|
||||
# package
|
||||
|
||||
git clone --branch v2.22.1 https://github.com/iMDT/hasura-graphql-engine.git #TODO
|
||||
cat hasura-graphql-engine/hasura-graphql.part-a* > hasura-graphql
|
||||
rm -rf hasura-graphql-engine/
|
||||
chmod +x hasura-graphql
|
||||
|
||||
mkdir -p staging/usr/local/bin/hasura-graphql-engine
|
||||
cp -r hasura-graphql staging/usr/local/bin/hasura-graphql-engine
|
||||
|
||||
mkdir -p staging/etc/default/bbb-graphql-server
|
||||
cp ./hasura-config.env staging/etc/default/bbb-graphql-server
|
||||
|
||||
mkdir -p staging/lib/systemd/system/bbb-graphql-server.service
|
||||
cp ./bbb-graphql-server.service staging/lib/systemd/system/bbb-graphql-server.service
|
||||
|
||||
mkdir -p staging/usr/share/bigbluebutton/nginx
|
||||
cp graphql.nginx staging/usr/share/bigbluebutton/nginx
|
||||
|
||||
mkdir -p hasura-cli
|
||||
cd hasura-cli
|
||||
npm install --save-dev hasura-cli
|
||||
ls -l node_modules
|
||||
mkdir -p staging/usr/local/bin/hasura
|
||||
cp -r node_modules/hasura-cli/* staging/usr/local/bin/hasura
|
||||
cd ..
|
||||
rm -rf hasura-cli
|
||||
|
||||
. ./opts-$DISTRO.sh
|
||||
|
||||
#
|
||||
# Build package
|
||||
fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--version $VERSION --epoch $EPOCH \
|
||||
--after-install after-install.sh \
|
||||
--after-remove after-remove.sh \
|
||||
--before-remove before-remove.sh \
|
||||
--description "GraphQL server component for BigBlueButton" \
|
||||
$DIRECTORIES \
|
||||
$OPTS
|
4
build/packages-template/bbb-graphql-server/opts-jammy.sh
Normal file
4
build/packages-template/bbb-graphql-server/opts-jammy.sh
Normal file
@ -0,0 +1,4 @@
|
||||
. ./opts-global.sh
|
||||
|
||||
OPTS="$OPTS -d postgresql,postgresql-contrib -t deb"
|
||||
# OPTS="$OPTS -d postgresql,postgresql-contrib,gnupg2,curl,apt-transport-https,ca-certificates,libkrb5-3,libpq5,libnuma1,unixodbc-dev,libmariadb-dev-compat,mariadb-client-10.3 -t deb"
|
@ -91,7 +91,8 @@ cp bbb-html5-with-roles.conf staging/usr/share/meteor/bundle
|
||||
cp mongod_start_pre.sh staging/usr/share/meteor/bundle
|
||||
chmod +x staging/usr/share/meteor/bundle/mongod_start_pre.sh
|
||||
|
||||
cp mongo-ramdisk.conf staging/etc/mongod.conf
|
||||
cp mongo-ramdisk.conf staging/usr/share/meteor/bundle
|
||||
# cp mongo-ramdisk.conf staging/etc/mongod.conf
|
||||
|
||||
mkdir -p staging/usr/lib/systemd/system
|
||||
cp bbb-html5.service staging/usr/lib/systemd/system
|
||||
|
@ -1,3 +1,3 @@
|
||||
. ./opts-global.sh
|
||||
|
||||
OPTS="$OPTS -d bc,bbb-pads,bbb-webrtc-sfu,bbb-export-annotations,bbb-web,bbb-html5-nodejs,yq,mongodb-org -t deb"
|
||||
OPTS="$OPTS -d bc,bbb-pads,bbb-webrtc-sfu,bbb-export-annotations,bbb-web,bbb-html5-nodejs,bbb-graphql-server,yq,mongodb-org -t deb"
|
||||
|
Loading…
Reference in New Issue
Block a user