Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---

version: 2

updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/electron"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/website"
schedule:
interval: "daily"

- package-ecosystem: "gomod"
directory: "src/jetstream/"
schedule:
interval: "daily"

28 changes: 28 additions & 0 deletions .github/workflows/container-push-base-images-develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: container-push-base-images-develop

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
push-store-image:
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: 'Log into GHCR'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: 'Checkout current develop'
uses: actions/checkout@v3
with:
ref: "devlop"
- name: 'Build stratos base images'
run: |
./deploy/stratos-base-images/build-base-images.sh -r ghcr.io -o anynines -p -s
2 changes: 1 addition & 1 deletion build/bk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ go env

# Need to install swag in both cases
echo "Generating OpenAPI documentation..."
go get github.com/swaggo/swag/cmd/swag@v1.6.7
go install github.com/swaggo/swag/cmd/swag@v1.6.7
swag init

if [ "${ACTION}" == "build" ]; then
Expand Down
8 changes: 4 additions & 4 deletions deploy/all-in-one/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ BOLD="\033[1m"

# Set defaults
PROD_RELEASE=false
DOCKER_REGISTRY=docker.io
DOCKER_ORG=splatform
BASE_IMAGE_TAG=leap15_1
DOCKER_REGISTRY=ghcr.io
DOCKER_ORG=anynines
BASE_IMAGE_TAG=centos7
TAG=$(date -u +"%Y%m%dT%H%M%SZ")
ADD_OFFICIAL_TAG="false"
TAG_LATEST="false"
Expand Down Expand Up @@ -151,7 +151,7 @@ function patchDockerfile {
if [ "${DOCKER_REG_DEFAULTS}" == "false" ]; then
sed -i.bak "s@splatform@${DOCKER_REGISTRY}/${DOCKER_ORG}@g" ${FOLDER}/${PATCHED_DOCKER_FILE}
fi
sed -i.bak "s/opensuse/${BASE_IMAGE_TAG}/g" ${FOLDER}/${PATCHED_DOCKER_FILE}
sed -i.bak "s/leap15_2/${BASE_IMAGE_TAG}/g" ${FOLDER}/${PATCHED_DOCKER_FILE}
popd > /dev/null 2>&1
}

Expand Down
11 changes: 6 additions & 5 deletions deploy/containers/kube-terminal/Dockerfile.kubeterminal
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ RUN useradd -ms /bin/bash stratos -K MAIL_DIR=/dev/null
RUN chown -R stratos /stratos && \
chgrp -R users /stratos

# Remove a few packages
RUN zypper rm -y diffutils shadow fillup openssl
# Keep them for the time being, as their removal was causing problems
# # Remove a few packages
# RUN zypper rm -y diffutils shadow fillup openssl

# Remove zypper
RUN zypper rm -y dirmngr && \
rm -rf /usr/bin/rpm*
# # Remove zypper
# RUN zypper rm -y dirmngr && \
# rm -rf /usr/bin/rpm*

USER stratos
WORKDIR /home/stratos
Expand Down
6 changes: 3 additions & 3 deletions deploy/kubernetes/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ BOLD="\033[1m"

# Set defaults
PROD_RELEASE=false
DOCKER_REGISTRY=docker.io
DOCKER_ORG=splatform
BASE_IMAGE_TAG=leap15_2
DOCKER_REGISTRY=ghcr.io
DOCKER_ORG=anynines
BASE_IMAGE_TAG=centos7
OFFICIAL_TAG=cap
TAG=$(date -u +"%Y%m%dT%H%M%SZ")
ADD_OFFICIAL_TAG="false"
Expand Down
4 changes: 4 additions & 0 deletions deploy/kubernetes/custom/customize-helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Set imagePullPolicy to IfNotPresent for deployments without registry
sed -i.bak -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' values.yaml
4 changes: 0 additions & 4 deletions deploy/stratos-base-images/Dockerfile.stratos-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
FROM {{BASE_IMAGE}}

{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
{{/IS_SLE}}

WORKDIR /srv
39 changes: 6 additions & 33 deletions deploy/stratos-base-images/Dockerfile.stratos-bk-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,39 +1,12 @@
FROM {{BASE_IMAGE}}

{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update
RUN zypper ref
{{/IS_SLE}}
RUN zypper in -y ca-certificates && \
zypper in -y curl && \
zypper in -y bind-utils && \
zypper in -y hostname && \
RUN yum install -y ca-certificates && \
yum install -y curl && \
yum install -y bind-utils && \
yum install -y hostname && \
mkdir -p /srv && \
mkdir -p /root/.npm-global
# Install latest git from devel/tools/scm repository
{{^IS_SLE}}
RUN zypper ar -p 50 http://download.opensuse.org/repositories/devel:/tools:/scm/openSUSE_Leap_15.1/devel:tools:scm.repo && \
zypper --no-gpg-checks in -y git && \
zypper rr devel_tools_scm && \
zypper clean -a && \
rm -f /var/log/zypper.log /var/log/zypp/history
{{/IS_SLE}}
{{#IS_SLE}}
RUN zypper ar http://download.opensuse.org/repositories/devel:/tools:/scm/SLE_15/devel:tools:scm.repo && \
zypper --no-gpg-checks in -y git && \
zypper rr devel_tools_scm && \
zypper clean -a && \
rm -f /var/log/zypper.log /var/log/zypp/history
{{/IS_SLE}}

RUN yum install -y git

{{#IS_SLE}}
RUN zypper rr base_ga
RUN zypper rr base_update
RUN zypper rr sp_ga
RUN zypper rr sp_update
{{/IS_SLE}}
WORKDIR /srv
14 changes: 8 additions & 6 deletions deploy/stratos-base-images/Dockerfile.stratos-bk-build-base.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ RUN useradd -ms /bin/bash stratos && \
chown -R stratos /home/stratos && \
chgrp -R users /home/stratos

RUN cd / && wget https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz && \
tar -xf node-v12.13.0-linux-x64.tar.xz && \
rm node-v12.13.0-linux-x64.tar.xz
RUN cd / && wget https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-{{NODE_ARCH}}.tar.gz && \
tar -xzf node-v12.22.9-linux-{{NODE_ARCH}}.tar.gz && \
rm node-v12.22.9-linux-{{NODE_ARCH}}.tar.gz

ENV USER=stratos
ENV PATH=$PATH:/node-v12.13.0-linux-x64/bin
USER stratos
WORKDIR /home/stratos

ENV PATH=$PATH:/node-v12.22.9-linux-{{NODE_ARCH}}/bin

USER stratos

WORKDIR /home/stratos
28 changes: 8 additions & 20 deletions deploy/stratos-base-images/Dockerfile.stratos-bk-init-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
FROM {{BASE_IMAGE}}

{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update
RUN zypper ref
{{/IS_SLE}}
RUN zypper in -y ca-certificates && \
zypper in -y curl && \
zypper in -y openssh && \
zypper in -y jq && \
zypper in -y bind-utils && \
zypper in -y hostname && \
RUN yum install -y ca-certificates && \
yum install -y curl && \
yum install -y openssl \
yum install -y openssh && \
yum install -y epel-release \
yum install -y jq && \
yum install -y bind-utils && \
yum install -y hostname && \
mkdir -p /srv && \
mkdir -p /root/.npm-global

{{#IS_SLE}}
RUN zypper rr base_ga
RUN zypper rr base_update
RUN zypper rr sp_ga
RUN zypper rr sp_update
{{/IS_SLE}}
WORKDIR /srv
31 changes: 6 additions & 25 deletions deploy/stratos-base-images/Dockerfile.stratos-go-build-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
FROM {{BASE_IMAGE}}

{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update
RUN zypper ref
{{/IS_SLE}}

RUN zypper -n ref && \
zypper -n up && \
zypper in -y which tar git gcc curl wget gzip xz unzip make && \
zypper clean -a && \
rm -f /var/log/zypper.log /var/log/zypp/history

RUN wget https://storage.googleapis.com/golang/go1.13.4.linux-amd64.tar.gz && \
tar -xzf go1.13.4.linux-amd64.tar.gz -C /usr/local/ && \
rm go1.13.4.linux-amd64.tar.gz && \
RUN yum update -y && \
yum install -y git gcc wget gzip xz unzip

RUN wget https://storage.googleapis.com/golang/go1.20.7.linux-{{GO_ARCH}}.tar.gz && \
tar -xzf go1.20.7.linux-{{GO_ARCH}}.tar.gz -C /usr/local/ && \
rm go1.20.7.linux-{{GO_ARCH}}.tar.gz && \
mkdir -p /home/stratos/go/bin && \
mkdir -p /home/stratos/go/src

ENV PATH $PATH:/usr/local/go/bin:/home/stratos/go/bin
ENV GOPATH /home/stratos/go

{{#IS_SLE}}
RUN zypper rr base_ga
RUN zypper rr base_update
RUN zypper rr sp_ga
RUN zypper rr sp_update
{{/IS_SLE}}

WORKDIR /home/stratos/go
46 changes: 7 additions & 39 deletions deploy/stratos-base-images/Dockerfile.stratos-mariadb-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,49 +1,24 @@
FROM {{BASE_IMAGE}}

{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update
RUN zypper ref
{{/IS_SLE}}

# Default password for root of mariadb
ENV MYSQL_ROOT_PASSWORD mysecretpassword

# Install specific version of MariaDB = 10.2.34

# OpenSUSE Leap
{{^IS_SLE}}
RUN zypper in -y curl wget && \
rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB && \
zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.2/opensuse/15/x86_64 mariadb
{{/IS_SLE}}
# centos 7
RUN rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB && \
yum-config-manager --add-repo https://mirror.mariadb.org/yum/10.2.44/{{MARIADB_ARCH}}/

# SLSES
{{#IS_SLE}}
RUN zypper in -y curl wget && \
rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB && \
zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.2/sles/15/x86_64 mariadb
{{/IS_SLE}}

# Install packages
RUN zypper --gpg-auto-import-keys refresh && \
zypper in -y MariaDB-server=10.2.34-1 && \
zypper in -y MariaDB-client=10.2.34-1
RUN yum install -y mariadb-client mariadb-server

RUN zypper in -y net-tools timezone wget awk grep && \
zypper clean -a && \
rm -f /var/log/zypper.log /var/log/zypp/history
RUN yum install -y net-tools wget

# Install from default repository
# RUN zypper in -y mariadb net-tools mariadb-tools timezone wget awk grep && \
# zypper clean -a && \
# rm -f /var/log/zypper.log /var/log/zypp/history
RUN yum install -y net-tools wget grep

ARG GOSU_VERSION=1.11
RUN wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
RUN wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-{{GOSU_ARCH}}" \
&& chmod +x /usr/local/bin/gosu

# Config for mariadb
Expand All @@ -53,11 +28,4 @@ RUN rm -rf /var/lib/mysql \
&& touch /var/log/mysql/mysqld.log \
&& chown -R mysql:mysql /var/log/mysql

{{#IS_SLE}}
RUN zypper rr base_ga
RUN zypper rr base_update
RUN zypper rr sp_ga
RUN zypper rr sp_update
{{/IS_SLE}}

VOLUME ["/var/lib/mysql"]
24 changes: 4 additions & 20 deletions deploy/stratos-base-images/Dockerfile.stratos-nginx-base.tmpl
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
FROM {{BASE_IMAGE}}
{{#IS_SLE}}
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update
RUN zypper addrepo -G -c -p 50 'http://nginx.org/packages/sles/15' nginx
{{/IS_SLE}}

RUN zypper -n ref && \
zypper -n up && \
zypper in -y nginx apache2-utils && \
zypper clean -a && \
rm -f /var/log/zypper.log /var/log/zypp/history
RUN echo -e "[nginx]\nname=nginx repo\nbaseurl=https://nginx.org/packages/{{NGINX_ARCH}}/\ngpgcheck=0\nenabled=1" >> /etc/yum.repos.d/nginx.repo

{{#IS_SLE}}
RUN zypper rr nginx
RUN zypper rr base_ga
RUN zypper rr base_update
RUN zypper rr sp_ga
RUN zypper rr sp_update
{{/IS_SLE}}
RUN yum update -y && \
yum install -y epel-release && \
yum install -y nginx apache2-utils
Loading