Skip to content

Commit

Permalink
new file: local_build.sh
Browse files Browse the repository at this point in the history
	modified:   scripts/deployment_dependencies.sh
	modified:   scripts/install_dependencies.sh
  • Loading branch information
jwillmartin committed Dec 18, 2023
1 parent 6b604b7 commit 5a67801
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
37 changes: 37 additions & 0 deletions local_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

# exit on errors
set -e

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

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 $dir/ext/
./build.sh

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

./database.sh
./library.sh
ldconfig

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

$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

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 @@ -53,3 +54,14 @@ cd build
cmake ..
make -j${numCPU}
make install

# Install librdkafka from instructions provided here https://github.com/confluentinc/librdkafka/tree/master/packaging/cmake
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 5a67801

Please sign in to comment.