Commit 102c0972 authored by Claes's avatar Claes Committed by Esteban Blanc

Docker updates

parent 835badcc
...@@ -8,10 +8,14 @@ ARG INSTALL_GIT ...@@ -8,10 +8,14 @@ ARG INSTALL_GIT
ARG INSTALL_BUILD ARG INSTALL_BUILD
ARG INSTALL_RPI ARG INSTALL_RPI
ARG JDK_DIR ARG JDK_DIR
ARG TZ
ENV DISPLAY :1 ENV DISPLAY :1
ENV DEBIAN_FRONTEND none_interactive ENV DEBIAN_FRONTEND none_interactive
ENV TZ=$TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./build/build.sh ./build/build_pwrdemo.sh ./build/build_pkg.sh ./build/build_pwrtest01.sh ./build/build_rpi.sh ./ COPY ./build/build.sh ./build/build_pwrdemo.sh ./build/build_pkg.sh ./build/build_pwrtest01.sh ./build/build_rpi.sh ./
RUN $INSTALL_UPDATE RUN $INSTALL_UPDATE
RUN $INSTALL_GIT RUN $INSTALL_GIT
......
...@@ -3,11 +3,15 @@ FROM $RELEASE ...@@ -3,11 +3,15 @@ FROM $RELEASE
ARG INSTALL_UPDATE ARG INSTALL_UPDATE
ARG INSTALL_PWR ARG INSTALL_PWR
ARG PKG_PWR ARG PKG_PWR
ARG TZ
ENV DISPLAY :1 ENV DISPLAY :1
ENV DEBIAN_FRONTEND none_interactive ENV DEBIAN_FRONTEND none_interactive
ENV TZ=$TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./pkg/$PKG_PWR ./dummy_display_xorg.conf ./ COPY ./pkg/$PKG_PWR ./dummy_display_xorg.conf ./
RUN $INSTALL_UPDATE RUN $INSTALL_UPDATE
RUN $INSTALL_PWR RUN $INSTALL_PWR
RUN apt-get install -y xserver-xorg-video-dummy RUN apt-get install -y xserver-xorg-video-dummy
......
...@@ -3,11 +3,15 @@ FROM $RELEASE ...@@ -3,11 +3,15 @@ FROM $RELEASE
ARG INSTALL_UPDATE ARG INSTALL_UPDATE
ARG INSTALL_PWRRT ARG INSTALL_PWRRT
ARG PKG_PWRRT ARG PKG_PWRRT
ARG TZ
ENV DISPLAY :1 ENV DISPLAY :1
ENV DEBIAN_FRONTEND none_interactive ENV DEBIAN_FRONTEND none_interactive
ENV TZ=$TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./pkg/$PKG_PWRRT ./dummy_display_xorg.conf ./ COPY ./pkg/$PKG_PWRRT ./dummy_display_xorg.conf ./
RUN $INSTALL_UPDATE RUN $INSTALL_UPDATE
RUN $INSTALL_PWRRT RUN $INSTALL_PWRRT
RUN apt-get install -y xserver-xorg-video-dummy RUN apt-get install -y xserver-xorg-video-dummy
......
...@@ -5,15 +5,18 @@ echo "Here in test_pwrtest01a.sh" ...@@ -5,15 +5,18 @@ echo "Here in test_pwrtest01a.sh"
Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config ./dummy_display_xorg.conf :99 & Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config ./dummy_display_xorg.conf :99 &
sleep 20 sleep 20
source /home/pwrp/.bashrc
pwr_pkg.sh -i /home/pwrp/pwrp_pkg_pwrtest01a_0001.tgz
chown root $pwrp_exe/plc_pwrtest01a_0999_plc
chmod u+s $pwrp_exe/plc_pwrtest01a_0999_plc
ls -l $pwrp_exe/plc_pwrtest01a_0999_plc
su - pwrp su - pwrp
cd /home/pwrp cd /home/pwrp
pwd
source .bashrc source .bashrc
export DISPLAY=:99 export DISPLAY=:99
pwd
export PWR_BUS_ID=999 export PWR_BUS_ID=999
export PYTHONPATH=$pwr_exe export PYTHONPATH=$pwr_exe
pwr_pkg.sh -i /home/pwrp/pwrp_pkg_pwrtest01a_0001.tgz
# Rename boot, node and plcfiles # Rename boot, node and plcfiles
nname=`eval uname -n` nname=`eval uname -n`
...@@ -29,7 +32,17 @@ echo "alias pwrtest01b pwrtest01b 172.18.0.23" >> $pwrp_load/pwrp_alias.dat ...@@ -29,7 +32,17 @@ echo "alias pwrtest01b pwrtest01b 172.18.0.23" >> $pwrp_load/pwrp_alias.dat
rt_ini -i -n pwrtest01a& rt_ini -i -n pwrtest01a&
sleep 10 sleep 10
#echo "Nodes-Pwrtest01a-IO-MbServer.Status:"
#rt_gdhget Nodes-Pwrtest01a-IO-MbServer.Status
#echo "Nodes-Pwrtest01a-IO-MbServer.Connections:"
#rt_gdhget Nodes-Pwrtest01a-IO-MbServer.Connections
export PYTHONPATH=$pwr_exe export PYTHONPATH=$pwr_exe
ra_testall_a.sh ra_testall_a.sh
sleep 3 sleep 70
\ No newline at end of file #echo "Nodes-Pwrtest01a-IO-MbServer.RX_packets:"
#rt_gdhget Nodes-Pwrtest01a-IO-MbServer.RX_packets
#echo "Nodes-Pwrtest01a-IO-MbServer.TX_packets:"
#rt_gdhget Nodes-Pwrtest01a-IO-MbServer.TX_packets
#cat $pwrp_log/pwr*.log | grep plc
\ No newline at end of file
...@@ -21,13 +21,29 @@ nodefile=`eval ls -1 $pwrp_load/ld_node*.dat` ...@@ -21,13 +21,29 @@ nodefile=`eval ls -1 $pwrp_load/ld_node*.dat`
plcfile=`eval ls -1 $pwrp_exe/plc_*_0999_plc` plcfile=`eval ls -1 $pwrp_exe/plc_*_0999_plc`
echo "alias pwrtest01b $nname 172.18.0.23" > $pwrp_load/pwrp_alias.dat echo "alias pwrtest01b $nname 172.18.0.23" > $pwrp_load/pwrp_alias.dat
echo "alias pwrtest01a pwrtest01a 172.18.0.22" >> $pwrp_load/pwrp_alias.dat echo "alias pwrtest01a pwrtest01a 172.18.0.22" >> $pwrp_load/pwrp_alias.dat
echo $nname"_setval Nodes-Pwrtest01b-IO-Mb-pwrtest01a.Address = 172.18.0.22" >> $pwrp_load/pwrp_alias.dat
#mv $plcfile $pwrp_exe/"plc_"$nname"_0999_plc" #mv $plcfile $pwrp_exe/"plc_"$nname"_0999_plc"
cat $pwrp_load/pwrp_alias.dat
# Start project # Start project
rt_ini -i -n pwrtest01b& rt_ini -i -n pwrtest01b&
sleep 10 sleep 10
export PYTHONPATH=$pwr_exe export PYTHONPATH=$pwr_exe
#echo "Nodes-Pwrtest01b-IO-Mb-pwrtest01a.Address:"
#rt_gdhget Nodes-Pwrtest01b-IO-Mb-pwrtest01a.Address
#echo "Nodes-Pwrtest01b-IO-Mb-pwrtest01a.Status:"
#rt_gdhget Nodes-Pwrtest01b-IO-Mb-pwrtest01a.Status
ra_testall_b.sh ra_testall_b.sh
#cat $pwrp_log/pwr*.log | grep plc
#echo "Nodes-Pwrtest01b-IO-Mb-pwrtest01a.RX_packets:"
#rt_gdhget Nodes-Pwrtest01b-IO-Mb-pwrtest01a.RX_packets
#echo "Nodes-Pwrtest01b-IO-Mb-pwrtest01a.TX_packets:"
#rt_gdhget Nodes-Pwrtest01b-IO-Mb-pwrtest01a.TX_packets
sleep 5 sleep 5
\ No newline at end of file
...@@ -757,6 +757,8 @@ main() ...@@ -757,6 +757,8 @@ main()
verify(0); verify(0);
int log; int log;
tzset("Europe/Stockholm");
login pwrp pwrp login pwrp pwrp
log = tstlog_open("wb_build-RootVolume", "$pwrp_log/pwrtest02_rootvolume.tlog"); log = tstlog_open("wb_build-RootVolume", "$pwrp_log/pwrtest02_rootvolume.tlog");
......
...@@ -1068,7 +1068,7 @@ void wa_ldhtest::GetNextAttrRef(void) ...@@ -1068,7 +1068,7 @@ void wa_ldhtest::GetNextAttrRef(void)
{pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[8].Super", "Test02-First-R1.Motors[8].Contactor1.Super", LDH__SUCCESS}, {pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[8].Super", "Test02-First-R1.Motors[8].Contactor1.Super", LDH__SUCCESS},
{pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[8].Contactor1.Super", "Test02-First-R1.Motors[9].Super", LDH__SUCCESS}, {pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[8].Contactor1.Super", "Test02-First-R1.Motors[9].Super", LDH__SUCCESS},
{pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[9].Super", "Test02-First-R1.Motors[9].Contactor2.Super", LDH__SUCCESS}, {pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[9].Super", "Test02-First-R1.Motors[9].Contactor2.Super", LDH__SUCCESS},
{pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[9].Contactor2.Super", "", LDH__NO_TYPE} {pwr_cClass_Pwrt02_Component, "Test02-First-R1.Motors[9].Contactor2.Super", "", LDH__NONEXT}
}; };
pwr_tAttrRef aref, nextaref; pwr_tAttrRef aref, nextaref;
char *nextname; char *nextname;
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
release="debian:10" release="debian:10"
release_name="deb" release_name="deb"
buildversion="08-SEP-2020 12:00:00" buildversion="08-SEP-2020 12:00:00"
tz="Europe/Stockholm"
build_rpi=1 build_rpi=1
gitrepo="-b stable http://192.168.0.105/git/x5-7-2/pwr/.git" gitrepo="-b stable http://192.168.0.105/git/x5-7-2/pwr/.git"
install_update="apt-get update" install_update="apt-get update"
install_git="apt-get install -y git make" install_git="apt-get install -y git make"
install_build="apt-get install -y libgtk2.0-dev doxygen gcc g++ make libasound2-dev \ install_build="apt-get install -y libgtk2.0-dev doxygen gcc g++ make libasound2-dev \
libdb5.3-dev libdb5.3++-dev openjdk-11-jdk libmariadb-dev \ libdb5.3-dev libdb5.3++-dev openjdk-11-jdk default-libmysqlclient-dev \
libsqlite3-dev libhdf5-openmpi-dev librabbitmq-dev libusb-1.0.0-dev librsvg2-dev \ libsqlite3-dev libhdf5-openmpi-dev librabbitmq-dev libusb-1.0.0-dev librsvg2-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpython-dev" libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpython-dev"
install_rpi="apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf" install_rpi="apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf"
...@@ -21,7 +22,8 @@ install_pwrrt="apt-get install -y libgtk2.0-0 libasound2 \ ...@@ -21,7 +22,8 @@ install_pwrrt="apt-get install -y libgtk2.0-0 libasound2 \
libdb5.3 libdb5.3++ libsqlite3-0 librsvg2-2 g++ xterm libmariadb3 \ libdb5.3 libdb5.3++ libsqlite3-0 librsvg2-2 g++ xterm libmariadb3 \
librabbitmq4 libusb-1.0-0 libhdf5-openmpi-103 \ librabbitmq4 libusb-1.0-0 libhdf5-openmpi-103 \
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \ libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
xterm xfonts-100dpi sudo procps python" xterm xfonts-100dpi sudo procps python python-pandas python-seaborn \
python-statsmodels python-sklearn"
jdk_dir=/usr/lib/jvm/java-11-openjdk-amd64 jdk_dir=/usr/lib/jvm/java-11-openjdk-amd64
ver="5.7.2-1" ver="5.7.2-1"
sver="57" sver="57"
...@@ -40,7 +42,7 @@ else ...@@ -40,7 +42,7 @@ else
start=$1 start=$1
fi fi
if [ "$2" == "" ]; then if [ "$2" == "" ]; then
end=7 end=8
else else
end=$2 end=$2
fi fi
...@@ -69,8 +71,11 @@ if [ $start -le 1 ] && [ $end -ge 1 ]; then ...@@ -69,8 +71,11 @@ if [ $start -le 1 ] && [ $end -ge 1 ]; then
--build-arg INSTALL_BUILD="$install_build" \ --build-arg INSTALL_BUILD="$install_build" \
--build-arg INSTALL_RPI="$install_rpi" \ --build-arg INSTALL_RPI="$install_rpi" \
--build-arg JDK_DIR=$jdk_dir \ --build-arg JDK_DIR=$jdk_dir \
--build-arg TZ=$tz \
./ ./
docker container create --name tmp pwr:v1 docker container create --name tmp pwr:v1
docker container cp tmp:/pwr/build.log ./log/
docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/exp/lis/build.tlog ./log/
docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwr ./pkg/ docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwr ./pkg/
docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwrdemo ./pkg/ docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwrdemo ./pkg/
docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwrrt ./pkg/ docker container cp tmp:/pwr/rls/os_linux/hw_x86_64/bld/pkg/$pkg_pwrrt ./pkg/
...@@ -91,6 +96,7 @@ if [ $start -le 2 ] && [ $end -ge 2 ]; then ...@@ -91,6 +96,7 @@ if [ $start -le 2 ] && [ $end -ge 2 ]; then
--build-arg INSTALL_UPDATE="$install_update" \ --build-arg INSTALL_UPDATE="$install_update" \
--build-arg INSTALL_PWR="$install_pwr" \ --build-arg INSTALL_PWR="$install_pwr" \
--build-arg PKG_PWR=$pkg_pwr \ --build-arg PKG_PWR=$pkg_pwr \
--build-arg TZ=$tz \
./ ./
fi fi
...@@ -101,6 +107,7 @@ if [ $start -le 3 ] && [ $end -ge 3 ]; then ...@@ -101,6 +107,7 @@ if [ $start -le 3 ] && [ $end -ge 3 ]; then
--build-arg INSTALL_UPDATE="$install_update" \ --build-arg INSTALL_UPDATE="$install_update" \
--build-arg INSTALL_PWRRT="$install_pwrrt" \ --build-arg INSTALL_PWRRT="$install_pwrrt" \
--build-arg PKG_PWRRT=$pkg_pwrrt \ --build-arg PKG_PWRRT=$pkg_pwrrt \
--build-arg TZ=$tz \
./ ./
fi fi
...@@ -180,7 +187,21 @@ if [ $start -le 7 ] && [ $end -ge 7 ]; then ...@@ -180,7 +187,21 @@ if [ $start -le 7 ] && [ $end -ge 7 ]; then
docker container cp pwrta:/pwrp/common/log/neth.tlog ./log/ docker container cp pwrta:/pwrp/common/log/neth.tlog ./log/
docker container cp pwrta:/pwrp/common/log/qcom2a.tlog ./log/ docker container cp pwrta:/pwrp/common/log/qcom2a.tlog ./log/
docker container cp pwrtb:/pwrp/common/log/qcom2b.tlog ./log/ docker container cp pwrtb:/pwrp/common/log/qcom2b.tlog ./log/
docker container cp pwrtb:/pwrp/common/log/qcom2b.tlog ./log/
docker container cp pwrtb:/pwrp/common/log/modbustcp.tlog ./log/
docker container rm pwrta pwrtb docker container rm pwrta pwrtb
docker image rm pwrtest01a:v1 pwrtest01b:v1 docker image rm pwrtest01a:v1 pwrtest01b:v1
fi fi
# Runtime container pwrtest01d
if [ $start -le 8 ] && [ $end -ge 8 ]; then
docker image build -t pwrtest01d:v1 -f pwrtest01/Dockerfile.pwrtest01d \
--build-arg RELEASE=$img_pwrrt \
./
docker run --name pwrtd pwrtest01d:v1
docker container cp pwrtd:/pwrp/common/log/sev.tlog ./log/
docker container rm pwrtd
# docker image rm pwrtest01d:v1
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment