Skip to content

Commit

Permalink
Aded impl for bazaar issue 8232 and moved from debian9 to debian10
Browse files Browse the repository at this point in the history
  • Loading branch information
absidish committed Nov 27, 2020
1 parent 715f3ee commit eb5ce20
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ Furkan Bicak <[email protected]> Furkan Bicak <[email protected]>
Furkan Bicak <[email protected]> Furkan Bıçak <[email protected]>
Furkan Bicak <[email protected]> Furkan Bıçak <[email protected]>

Ilarion (Larik) Stus <[email protected]> Ilarion Stus <[email protected]>
Ilarion (Larik) Stus <[email protected]> istus <[email protected]>
Ilarion (Larik) Stus <[email protected]> Larik <[email protected]>
Ilarion (Larik) Stus <[email protected]> ubuntu <[email protected]>
Ilarion (Larik) Stus <[email protected]> larenso <[email protected]>
Ilarion (Larik) Stus <[email protected]> larenso <[email protected]>
Ilarion Stus <[email protected]> Ilarion Stus <[email protected]>
Ilarion Stus <[email protected]> istus <[email protected]>
Ilarion Stus <[email protected]> Larik <[email protected]>
Ilarion Stus <[email protected]> ubuntu <[email protected]>
Ilarion Stus <[email protected]> larenso <[email protected]>
Ilarion Stus <[email protected]> larenso <[email protected]>

Jenkins Admin <[email protected]> Jenkins Admin <[email protected]>

Expand Down
17 changes: 12 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ try {
def mvnHome = tool 'M3'
def workspace = pwd()

stage("Build management deb package")
stage("Build management deb package")
// Use maven to to build deb and template files of management
notifyBuildDetails = "\nFailed Step - Build management deb package"

Expand All @@ -42,6 +42,10 @@ try {
// build deb
sh """
cd management
set +x
set -e
git checkout ${env.BRANCH_NAME}
sed 's/export BAZAAR_IP=.*/export BAZAAR_IP=${cdnHost}/g' -i server/server-karaf/src/main/assembly/bin/setenv
if [[ "${env.BRANCH_NAME}" == "dev" ]]; then
Expand Down Expand Up @@ -77,23 +81,26 @@ try {

// create management template

sh """
set +x
sh """
set +x
set -e
sudo sed 's/URL =.*/URL = ${cdnHost}/gI' -i /etc/subutai/agent.conf
sudo sed 's/SshJumpServer =.*/SshJumpServer = ${jumpServer}/gI' -i /etc/subutai/agent.conf
set +e
sudo subutai destroy management
set -e
sudo subutai clone debian-stretch:subutai:0.4.5 management
sudo subutai clone debian-buster management
/bin/sleep 20
cp ${workspace}/${debFileName} /var/lib/lxc/management/rootfs/tmp/
sudo subutai attach management "apt-get update && apt-get install dirmngr -y"
sudo subutai attach management "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C6B2AC7FBEB649F1"
sudo subutai attach management "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 8AC3B29174885C03"
sudo subutai attach management "echo 'deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main' > /etc/apt/sources.list.d/adoptopenjdk.list"
sudo subutai attach management "echo 'deb http://deb.subutai.io/subutai ${aptRepo} main' > /etc/apt/sources.list.d/subutai-repo.list"
sudo subutai attach management "apt-get update && apt upgrade -y"
sudo subutai attach management "sync"
sudo subutai attach management "apt-get -y install curl influxdb influxdb-certs openjdk-8-jre"
sudo subutai attach management "apt-get -y install curl influxdb influxdb-certs adoptopenjdk-8-hotspot adoptopenjdk-8-hotspot-jre"
sudo cp ~/influxdb.conf /var/lib/lxc/management/rootfs/etc/influxdb/influxdb.conf
sudo subutai attach management "dpkg -i /tmp/${debFileName}"
sudo subutai attach management "systemctl stop management"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ private void handlePortMap( PortMapDto portMapDto )
DestroyPortMap destroyPortMap = new DestroyPortMap( ctx );
destroyPortMap.deleteMap( portMapDto );
break;
case RECREATE:
recreatePortMap( portMapDto );
break;
case ERROR:
break;
case USED:
Expand All @@ -124,6 +127,14 @@ private void handlePortMap( PortMapDto portMapDto )
}


private void recreatePortMap( PortMapDto portMapDto )
{
DestroyPortMap destroyPortMap = new DestroyPortMap( ctx );
destroyPortMap.deleteMap( portMapDto );
createMap( portMapDto );
}


private void createMap( PortMapDto portMapDto )
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public boolean isHttpOrHttps()

public enum State
{
CREATING, RESERVED, USED, DESTROYING, ERROR, DELETED
CREATING, RESERVED, USED, DESTROYING, ERROR, DELETED, RECREATE
}


Expand Down

0 comments on commit eb5ce20

Please sign in to comment.