Selaa lähdekoodia

:bug: fix spring image

Jeremy Zheng 1 vuosi sitten
vanhempi
sitoutus
ef4386cf15

+ 1 - 1
dashboard-v4/docker/README.md

@@ -11,7 +11,7 @@ sudo apt install crun podman buildah
   podman system reset # clean
   podman images # show images
   podman ps -a # show containers
-  podman load -i tmp/palm-CODE-TIMESTAMP.tar # import image
+  podman load -i tmp/CODE-TIMESTAMP.tar # import image
   ```
 
 - Envoy build

+ 1 - 1
dashboard-v4/docker/spring/README.md

@@ -11,7 +11,7 @@
 
   ```bash
   $ cd ~/workspace
-  $ ./saturn-xiv/palm/docker/spring/start.sh
+  $ ./iapt-platform/mint/docker/spring/start.sh
   > supervisord -c /etc/supervisor/supervisord.conf
   # init redis cluster
   > /etc/redis/clusters-init.sh

+ 1 - 1
dashboard-v4/docker/spring/build.sh

@@ -3,7 +3,7 @@
 set -e
 
 export VERSION=$(date "+%4Y%m%d%H%M%S")
-export CODE="palm-spring"
+export CODE="-spring"
 
 buildah pull ubuntu:latest
 buildah bud --layers -t $CODE .

+ 3 - 0
deploy/roles/ubuntu/tasks/main.yml

@@ -60,6 +60,9 @@
       - python3-certbot-nginx
       - build-essential
       - ninja-build
+      - bison
+      - flex
+      - mold
       - pkg-config
       - cmake
       - libssl-dev

+ 0 - 161
docker/jammy/Dockerfile

@@ -1,161 +0,0 @@
-FROM ubuntu:jammy
-LABEL maintainer="Jeremy Zheng"
-
-ENV DEBIAN_FRONTEND noninteractive
-
-RUN apt update
-RUN apt install -y lsb-release apt-utils \
-    debian-keyring debian-archive-keyring apt-transport-https software-properties-common curl wget gnupg
-# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
-ENV AMD64_GCC_VERSION 13
-ENV GCC_VERSION 12
-RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
-RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" > /etc/apt/sources.list
-RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse" >> /etc/apt/sources.list
-RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse" >> /etc/apt/sources.list
-# https://apt.llvm.org/
-ENV CLANG_VERSION 18
-RUN echo "deb [arch=amd64] http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${CLANG_VERSION} main" > /etc/apt/sources.list.d/llvm.list
-RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
-# https://wiki.debian.org/ToolChain/Cross
-RUN dpkg --add-architecture armhf
-RUN dpkg --add-architecture arm64
-RUN dpkg --add-architecture riscv64
-RUN echo "deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ $(lsb_release -cs) main restricted universe multiverse" >> /etc/apt/sources.list
-RUN echo "deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ $(lsb_release -cs)-security main restricted universe multiverse" >> /etc/apt/sources.list
-RUN echo "deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ $(lsb_release -cs)-updates main restricted universe multiverse" >> /etc/apt/sources.list
-RUN apt update
-RUN apt -y upgrade
-
-RUN apt -y install zsh git locales locales-all \
-    vim tzdata zip unzip tree tmux \
-    build-essential g++-${GCC_VERSION} libstdc++-${GCC_VERSION}-dev \
-    g++-${AMD64_GCC_VERSION} libstdc++-${AMD64_GCC_VERSION}-dev \
-    crossbuild-essential-arm64 g++-${GCC_VERSION}-aarch64-linux-gnu libstdc++-${GCC_VERSION}-dev:arm64 \
-    crossbuild-essential-armhf g++-${GCC_VERSION}-arm-linux-gnueabihf libstdc++-${GCC_VERSION}-dev:armhf \
-    crossbuild-essential-riscv64 g++-${GCC_VERSION}-riscv64-linux-gnu libstdc++-${GCC_VERSION}-dev:riscv64 \
-    clang-${CLANG_VERSION} clangd-${CLANG_VERSION} clang-tools-${CLANG_VERSION} clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
-    cmake pkg-config libtool automake autoconf autoconf-archive binutils cpio mold \
-    debhelper bison flex ninja-build \
-    erlang elixir \
-    python3-full python3-dev
-
-RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${CLANG_VERSION} 100 \
-    && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${AMD64_GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${AMD64_GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-${GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-${GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-${GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-${GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/riscv64-linux-gnu-gcc riscv64-linux-gnu-gcc /usr/bin/riscv64-linux-gnu-gcc-${GCC_VERSION} 100 \
-    && update-alternatives --install /usr/bin/riscv64-linux-gnu-g++ riscv64-linux-gnu-g++ /usr/bin/riscv64-linux-gnu-g++-${GCC_VERSION} 100
-
-RUN apt -y autoremove
-RUN apt -y clean
-
-RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
-RUN locale-gen
-RUN update-locale LANG=en_US.UTF-8
-RUN update-alternatives --set editor /usr/bin/vim.basic
-
-RUN mkdir -p $HOME/downloads $HOME/build $HOME/local $HOME/tmp
-
-# https://github.com/ohmyzsh/ohmyzsh
-RUN git clone https://github.com/ohmyzsh/ohmyzsh.git $HOME/.oh-my-zsh
-RUN cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc
-RUN echo 'export LANG=en_US.UTF-8' >> $HOME/.zshrc
-RUN echo 'export LC_ALL=en_US.UTF-8' >> $HOME/.zshrc
-RUN echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.zshrc
-
-RUN git config --global core.quotepath false \
-    && git config --global http.version HTTP/1.1 \
-    && git config --global pull.rebase false \
-    && git config --global url."https://".insteadOf git://
-RUN echo 'set-option -g history-limit 102400' > $HOME/.tmux.conf \
-    && echo 'set-option -g default-shell "/bin/zsh"' >> $HOME/.tmux.conf
-
-# https://musl.cc/
-RUN wget -q -P $HOME/downloads https://more.musl.cc/x86_64-linux-musl/x86_64-linux-musl-cross.tgz \
-    && tar xf $HOME/downloads/x86_64-linux-musl-cross.tgz -C $HOME/local \
-    && echo 'export PATH=$HOME/local/x86_64-linux-musl-cross/bin:$PATH' >> $HOME/.zshrc
-RUN wget -q -P $HOME/downloads https://more.musl.cc/x86_64-linux-musl/armv7l-linux-musleabihf-cross.tgz \
-    && tar xf $HOME/downloads/armv7l-linux-musleabihf-cross.tgz -C $HOME/local \
-    && echo 'export PATH=$HOME/local/armv7l-linux-musleabihf-cross/bin:$PATH' >> $HOME/.zshrc
-RUN wget -q -P $HOME/downloads https://more.musl.cc/x86_64-linux-musl/aarch64-linux-musl-cross.tgz \
-    && tar xf $HOME/downloads/aarch64-linux-musl-cross.tgz -C $HOME/local \
-    && echo 'export PATH=$HOME/local/aarch64-linux-musl-cross/bin:$PATH' >> $HOME/.zshrc
-RUN wget -q -P $HOME/downloads https://more.musl.cc/x86_64-linux-musl/riscv64-linux-musl-cross.tgz \
-    && tar xf $HOME/downloads/riscv64-linux-musl-cross.tgz -C $HOME/local \
-    && echo 'export PATH=$HOME/local/riscv64-linux-musl-cross/bin:$PATH' >> $HOME/.zshrc
-
-# https://github.com/nvm-sh/nvm
-ENV NVM_VERSION "v0.40.1"
-RUN git clone -b ${NVM_VERSION} https://github.com/nvm-sh/nvm.git $HOME/.nvm
-RUN echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.zshrc
-RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $HOME/.zshrc
-RUN echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> $HOME/.zshrc
-RUN zsh -c "source $HOME/.zshrc \
-    && nvm install --lts"
-
-ENV JDK_VERSION "23-open"
-# https://docs.gradle.org/current/userguide/compatibility.html
-RUN curl -s "https://get.sdkman.io" | bash
-RUN sed -i -e 's/sdkman_auto_answer=false/sdkman_auto_answer=true/g' $HOME/.sdkman/etc/config
-RUN zsh -c "source $HOME/.zshrc \
-    && sdk install java ${JDK_VERSION} \
-    && sdk install maven \
-    && sdk install gradle"
-
-# https://go.dev/doc/install
-ENV GO_VERSION "1.23.4"
-RUN wget -q -P $HOME/downloads https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
-RUN tar xf $HOME/downloads/go${GO_VERSION}.linux-amd64.tar.gz -C $HOME/local
-RUN echo 'export PATH=$HOME/local/go/bin:$PATH' >> $HOME/.zshrc \
-    && echo 'export GOPATH=$HOME/go' >> $HOME/.zshrc \
-    && echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >> $HOME/.zshrc
-
-# https://grpc.io/docs/languages/go/quickstart/
-RUN zsh -c "source $HOME/.zshrc \
-    && go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \
-    && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest"
-
-# https://www.rust-lang.org/tools/install
-RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
-RUN zsh -c "source $HOME/.cargo/env \
-    && rustup target add x86_64-unknown-linux-musl \
-    && rustup target add armv7-unknown-linux-gnueabihf \
-    && rustup target add aarch64-unknown-linux-gnu \
-    && rustup target add aarch64-unknown-linux-musl \
-    && rustup target add riscv64gc-unknown-linux-gnu"
-
-# https://github.com/microsoft/vcpkg
-RUN git clone https://github.com/microsoft/vcpkg.git $HOME/local/vcpkg
-RUN $HOME/local/vcpkg/bootstrap-vcpkg.sh \
-    && echo 'export VCPKG_DISABLE_METRICS=1' >> $HOME/.zshrc
-
-# https://github.com/grpc/grpc
-ENV GRPC_VERSION "v1.68.2"
-RUN git clone --recurse-submodules -b $GRPC_VERSION https://github.com/grpc/grpc.git $HOME/downloads/grpc
-RUN apt install -y libssl-dev
-RUN zsh -c "source $HOME/.zshrc \
-    && mkdir -pv $HOME/build/grpc \
-    && cd $HOME/build/grpc \
-    && cmake -DCMAKE_BUILD_TYPE=Release \
-    -DgRPC_INSTALL=ON \
-    -DgRPC_SSL_PROVIDER=package \
-    -DgRPC_BUILD_TESTS=OFF \
-    -DCMAKE_INSTALL_PREFIX=$HOME/.local $HOME/downloads/grpc \
-    && make -j $(nproc --ignore=2) \
-    && make install"
-
-RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
-
-VOLUME /workspace
-WORKDIR /workspace
-
-CMD ["/bin/zsh", "-l"]

+ 0 - 15
docker/jammy/build.sh

@@ -1,15 +0,0 @@
-#!/bin/bash
-
-set -e
-
-export VERSION=$(date "+%4Y%m%d%H%M%S")
-export CODE="palm-jammy"
-
-podman pull ubuntu:jammy
-podman build -t $CODE .
-podman save --format=oci-archive -o $CODE-$VERSION.tar $CODE
-md5sum $CODE-$VERSION.tar >$CODE-$VERSION.md5
-
-echo "done($CODE-$VERSION.tar)."
-
-exit 0

+ 0 - 10
docker/jammy/start.sh

@@ -1,10 +0,0 @@
-#!/bin/bash
-
-export CODE="palm-jammy"
-export NAME="$CODE-$USER"
-
-if podman container exists $NAME; then
-    podman start -i -a $NAME
-else
-    podman run --name $NAME -it --events-backend=file --hostname=palm --network host -v $PWD:/workspace:z $CODE
-fi

+ 13 - 10
docker/spring/Dockerfile

@@ -43,7 +43,7 @@ RUN curl -L -o $HOME/downloads/pkl https://github.com/apple/pkl/releases/downloa
 
 
 # https://github.com/envoyproxy/envoy
-ENV ENVOY_VERSION "1.32.3"
+ENV ENVOY_VERSION "1.33.0"
 RUN wget -q -O $HOME/downloads/envoy https://github.com/envoyproxy/envoy/releases/download/v${ENVOY_VERSION}/envoy-${ENVOY_VERSION}-linux-x86_64 \
     && sudo cp $HOME/downloads/envoy /usr/local/bin/ \
     && sudo chmod +x /usr/local/bin/envoy
@@ -123,7 +123,7 @@ RUN echo 'export ANSIBLE_HOST_KEY_CHECKING=False' >> $HOME/.zshrc \
 
 # https://github.com/rbenv/rbenv
 # https://github.com/rbenv/ruby-build/tree/master/share/ruby-build
-ENV RUBY_VERSION "3.3.6"
+ENV RUBY_VERSION "3.4.1"
 RUN git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv \
     && git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build \
     && git clone https://github.com/rbenv/rbenv-vars.git $HOME/.rbenv/plugins/rbenv-vars 
@@ -135,7 +135,7 @@ RUN zsh -c "source $HOME/.zshrc \
     && gem install bundler"
 
 # https://go.dev/doc/install
-ENV GO_VERSION "1.23.4"
+ENV GO_VERSION "1.23.5"
 RUN wget -q -P $HOME/downloads https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
 RUN tar xf $HOME/downloads/go${GO_VERSION}.linux-amd64.tar.gz -C $HOME/local
 RUN echo 'export PATH=$HOME/local/go/bin:$PATH' >> $HOME/.zshrc \
@@ -149,8 +149,8 @@ RUN zsh -c "source $HOME/.zshrc \
 
 # https://github.com/sdkman/sdkman-cli
 # https://docs.gradle.org/current/userguide/compatibility.html
-ENV JDK_VERSION "23-open"
-ENV GRADLE_VERSION "8.11.1"
+ENV JDK_VERSION "23.0.1-open"
+ENV GRADLE_VERSION "8.12.1"
 ENV THRIFT_JAVA_VERSION "19.0.2-open"
 ENV THRIFT_GRADLE_VERSION "7.6.4"
 RUN curl -s "https://get.sdkman.io" | bash
@@ -200,17 +200,20 @@ RUN zsh -c "source $HOME/.zshrc \
     && cargo install mdbook"
 
 # https://www.swift.org/download/#releases
-ENV SWIFT_VERSION "6.0.2"
+ENV SWIFT_VERSION "6.0.3"
 RUN wget -q -P $HOME/downloads https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2404/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu24.04.tar.gz \
     && tar xf $HOME/downloads/swift-${SWIFT_VERSION}-RELEASE-ubuntu24.04.tar.gz -C $HOME/local \
     && echo "export PATH=\$HOME/local/swift-${SWIFT_VERSION}-RELEASE-ubuntu24.04/bin:\$PATH" >> $HOME/.zshrc
 
+
+# https://xmake.io/#/guide/installation?id=via-curl
+RUN curl -fsSL https://xmake.io/shget.text | bash
+
 # https://github.com/microsoft/vcpkg
 RUN git clone https://github.com/microsoft/vcpkg.git $HOME/local/vcpkg
 RUN $HOME/local/vcpkg/bootstrap-vcpkg.sh \
     && echo 'export VCPKG_DISABLE_METRICS=1' >> $HOME/.zshrc
 
-
 # https://opensearch.org/downloads.html#opensearch
 ENV OPENSEARCH_VERSION "2.18.0"
 RUN wget -q -P $HOME/downloads \
@@ -219,7 +222,7 @@ RUN tar xf $HOME/downloads/opensearch-${OPENSEARCH_VERSION}-linux-x64.tar.gz -C
     && sudo mv $HOME/tmp/opensearch-${OPENSEARCH_VERSION} /opt/opensearch
 
 # https://github.com/grpc/grpc
-ENV GRPC_VERSION "v1.68.2"
+ENV GRPC_VERSION "v1.70.0"
 RUN git clone --recurse-submodules -b $GRPC_VERSION https://github.com/grpc/grpc.git $HOME/downloads/grpc
 # ENV PROTOBUF_VERSION "v3.21.8"
 # RUN cd $HOME/downloads/grpc/third_party/protobuf \
@@ -252,7 +255,7 @@ RUN mkdir -p $HOME/build/protobuf-javascript \
 
 # https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/
 # https://github.com/grpc/grpc-java
-ENV GRPC_JAVA_PLUGIN_VERSION "1.68.2"
+ENV GRPC_JAVA_PLUGIN_VERSION "1.70.1"
 RUN wget -q -O $HOME/.local/bin/grpc_java_plugin \
     https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/${GRPC_JAVA_PLUGIN_VERSION}/protoc-gen-grpc-java-${GRPC_JAVA_PLUGIN_VERSION}-linux-x86_64.exe
 RUN chmod +x $HOME/.local/bin/grpc_java_plugin
@@ -271,7 +274,7 @@ RUN zsh -c "source $HOME/.zshrc \
     go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest"
 
 # https://github.com/google/flatbuffers
-ENV FLATBUFFERS_VERSION "v24.3.25"
+ENV FLATBUFFERS_VERSION "v25.2.10"
 RUN git clone -b $FLATBUFFERS_VERSION https://github.com/google/flatbuffers.git $HOME/downloads/flatbuffers
 RUN zsh -c "source $HOME/.zshrc \
     && mkdir -pv $HOME/build/flatbuffers \

+ 1 - 1
docker/spring/README.md

@@ -11,7 +11,7 @@
 
   ```bash
   $ cd ~/workspace
-  $ ./saturn-xiv/palm/docker/spring/start.sh
+  $ ./iapt-platform/mint/docker/spring/start.sh
   > sudo supervisord -c /etc/supervisor/supervisord.conf
   # init redis cluster
   > sudo /etc/redis/clusters-init.sh

+ 1 - 1
docker/spring/build.sh

@@ -3,7 +3,7 @@
 set -e
 
 export VERSION=$(date "+%4Y%m%d%H%M%S")
-export CODE="palm-spring"
+export CODE="mint-spring"
 
 podman pull archlinux:latest
 podman build -t $CODE .

+ 1 - 1
docker/spring/start.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export CODE="palm-spring"
+export CODE="mint-spring"
 export NAME="$CODE-$USER"
 
 if podman container exists $NAME; then