Skip to content

Commit

Permalink
modified: Dockerfile
Browse files Browse the repository at this point in the history
	modified:   localbuild.sh
	modified:   scripts/deployment_dependencies.sh
	modified:   scripts/install_dependencies.sh
  • Loading branch information
jwillmartin committed Dec 18, 2023
1 parent f0f706f commit 8aadeb7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG UBUNTU_VERSION=jammy-20230126
ARG UBUNTU_VERSION=focal

FROM ubuntu:$UBUNTU_VERSION AS dependencies

Expand Down
35 changes: 21 additions & 14 deletions localbuild.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
#!/bin/bash

directory=$(pwd)
# exit on errors
set -e

dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# install dependencies
$directory/scripts/install_dependencies.sh
sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt/sources.list
$dir/scripts/install_dependencies.sh

# build out ext components
cd $directory/ext/
cd $dir/ext/
./build.sh

cp $directory/container/wait-for-it.sh /usr/local/bin/
cp $directory/container/service.sh /usr/local/bin/
cd $dir/container
cp wait-for-it.sh /usr/local/bin/
cp service.sh /usr/local/bin/

cd $directory/container/
./database.sh
./library.sh
ldconfig

# build internal components
cd $directory/src/
cd $dir/src/
./build.sh release
ldconfig
$directory/scripts/deployment_dependencies.sh

# package plugins
cd $directory/src/v2i-hub/
./package_plugins.sh
$directory/container/setup.sh
$dir/scripts/deployment_dependencies.sh

cp $dir/src/tmx/TmxCore/tmxcore.service /lib/systemd/system/
cp $dir/src/tmx/TmxCore/tmxcore.service /usr/sbin/
ldconfig

$dir/container/setup.sh

# start
/usr/local/bin/service.sh
# run
cd /var/log/tmx/
/usr/local/bin/service.sh
4 changes: 3 additions & 1 deletion scripts/deployment_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# exit on errors
set -e

distro=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | tr -d "DISTRIB_CODENAME=")

# add the STOL APT repository
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository develop main" > /etc/apt/sources.list.d/stol-apt-repository.list
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository ${distro} main" > /etc/apt/sources.list.d/stol-apt-repository.list

apt-get update

Expand Down
16 changes: 14 additions & 2 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# exit on errors
set -e

distro=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | tr -d "DISTRIB_CODENAME=")

# add the STOL APT repository
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository develop main" > /etc/apt/sources.list.d/stol-apt-repository.list
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository ${distro} main" > /etc/apt/sources.list.d/stol-apt-repository.list

apt-get update

Expand All @@ -20,7 +22,6 @@ DEPENDENCIES="build-essential \
libjsoncpp-dev \
libmysqlclient-dev \
libmysqlcppconn-dev \
librdkafka-dev \
libsnmp-dev \
libssl-dev \
libuv1-dev \
Expand Down Expand Up @@ -50,3 +51,14 @@ cd build
cmake ..
make -j${numCPU}
make install

# install lbrdkafka
echo " ------> Install librdkafka..."
cd /tmp
git clone https://github.com/confluentinc/librdkafka.git -b v2.2.0
cd librdkafka/
cmake -H. -B_cmake_build
cmake --build _cmake_build
cmake --build _cmake_build --target install
cd ../
rm -r librdkafka

0 comments on commit 8aadeb7

Please sign in to comment.