Skip to content

Commit c2112cb

Browse files
committed
chore(stacks): add profile.d dir
1 parent 9720c04 commit c2112cb

12 files changed

Lines changed: 60 additions & 23 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ RUN install-packages \
4545
python3-pip \
4646
default-libmysqlclient-dev; \
4747
pip install oss2
48+
49+
ADD ruby.sh /etc/profile.d/ruby.sh
50+
ENV ENV /etc/profile.d/*

scripts/stack-utils

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
set -e
3-
set -u
43

54
shopt -s expand_aliases
65
alias gzip="gzip -n -9"

stacks/erlang/build.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ libodbc1
1111
libsctp1
1212
libwxgtk3.0
1313
EOF
14-
export PATH="/opt/drycc/erlang/bin:$PATH"
15-
export C_INCLUDE_PATH="/opt/drycc/erlang/include"
16-
export CPLUS_INCLUDE_PATH="/opt/drycc/erlang/include"
17-
export LIBRARY_PATH="/opt/drycc/erlang/lib"
18-
export LD_LIBRARY_PATH="/opt/drycc/erlang/lib"
19-
export PKG_CONFIG_PATH="/opt/drycc/erlang/lib/pkg-config"
14+
mkdir -p /opt/drycc/erlang/profile.d
15+
cat << EOF > /opt/drycc/erlang/profile.d/erlang.sh
16+
export PATH="/opt/drycc/erlang/bin:\$PATH"
17+
EOF
18+
. /opt/drycc/erlang/profile.d/erlang.sh
2019
./make.sh
2120
cp -rf /opt/drycc/erlang /workspace/"${TARNAME}"/data
2221
}

stacks/go/build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55

66
# Implement build function
77
function build() {
8-
curl -L -o /opt/drycc/tmp.tar.gz https://go.dev/dl/go"${STACK_VERSION}".linux-"${OS_ARCH}".tar.gz
9-
cd /opt/drycc && tar -xvzf tmp.tar.gz && rm -rf tmp.tar.gz && cd -
10-
cp -rf /opt/drycc/go "${TARNAME}"/data
8+
curl -L -o /opt/drycc/tmp.tar.gz https://go.dev/dl/go"${STACK_VERSION}".linux-"${OS_ARCH}".tar.gz
9+
cd /opt/drycc && tar -xvzf tmp.tar.gz && rm -rf tmp.tar.gz && cd -
10+
mkdir -p /opt/drycc/erlang/profile.d
11+
cat << EOF > /opt/drycc/go/profile.d/go.sh
12+
export GOPATH="/opt/drycc/go"
13+
export PATH="\$GOPATH/bin:\$PATH"
14+
EOF
15+
cp -rf /opt/drycc/go "${TARNAME}"/data
1116
}
1217

1318
# call build stack

stacks/grafana/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ function build() {
99
tar -xvzf tmp.tar.gz
1010
mv grafana-${STACK_VERSION} ${TARNAME}/data/grafana
1111
rm tmp.tar.gz
12+
mkdir ${TARNAME}/data/grafana/profile.d
13+
cat << EOF > ${TARNAME}/data/grafana/profile.d/grafana.sh
14+
export PATH="/opt/drycc/grafana/bin:\$PATH"
15+
EOF
1216
}
1317

1418
# call build stack

stacks/influxdb/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55

66
# Implement build function
77
function build() {
8-
BIN_DIR="${TARNAME}/data/common/bin"
8+
BIN_DIR="${TARNAME}/data/influxdb/bin"
99
mkdir -p "${BIN_DIR}"
1010

1111
curl -fsSL -o tmp.tar.gz https://dl.influxdata.com/influxdb/releases/influxdb2-${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
1212
tar -xvzf tmp.tar.gz
1313
mv influxdb2-${STACK_VERSION}-linux-${OS_ARCH}/influxd "${BIN_DIR}"/influxd
1414
rm -rf tmp.tar.gz influxdb2-${STACK_VERSION}-linux-${OS_ARCH}
15+
cat << EOF > ${TARNAME}/data/influxdb/profile.d/influxdb.sh
16+
export PATH="/opt/drycc/influxdb/bin:\$PATH"
17+
EOF
18+
1519
}
1620

1721
# call build stack

stacks/minio/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55

66
# Implement build function
77
function build() {
8-
BIN_DIR="${TARNAME}/data/common/bin"
8+
BIN_DIR="${TARNAME}/data/minio/bin"
99
mkdir -p "${BIN_DIR}"
1010
curl -fsSL -o "${BIN_DIR}"/"${STACK_NAME}" https://dl.min.io/server/minio/release/linux-${OS_ARCH}/minio.${STACK_VERSION}
1111
chmod +x "${BIN_DIR}"/"${STACK_NAME}"
12+
13+
cat << EOF > ${TARNAME}/data/minio/profile.d/minio.sh
14+
export PATH="/opt/drycc/minio/bin:\$PATH"
15+
EOF
1216
}
1317

1418
# call build stack

stacks/podman/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,24 @@ EOF
6262

6363
mv /opt/drycc/podman/bin/podman /opt/drycc/podman/bin/podman-original
6464
cat << EOF > "/opt/drycc/podman/bin/podman"
65-
#!/bin/bash
66-
6765
if [ ! -d "/opt/cni" ];then
6866
ln -s /opt/drycc/podman/opt/cni /opt/cni
6967
fi
7068
7169
if [ ! -d "/etc/containers" ];then
7270
ln -s /opt/drycc/podman/etc/containers /etc/containers
7371
fi
74-
7572
exec /opt/drycc/podman/bin/podman-original --runtime /opt/drycc/podman/bin/crun "\$@"
7673
EOF
7774
chmod +x /opt/drycc/podman/bin/podman
75+
mkdir -p /opt/drycc/podman/profile.d
7876
mkdir -p /opt/drycc/podman/etc/containers
7977
mkdir -p /opt/drycc/podman/run/containers/storage
8078
mkdir -p /opt/drycc/podman/var/lib/containers/storage
8179
mkdir -p /opt/drycc/podman/var/lib/shared
80+
cat << EOF > "/opt/drycc/podman/profile.d/podman.sh"
81+
export PATH="/opt/drycc/podman/bin:\$PATH"
82+
EOF
8283
cat << EOF > "/opt/drycc/podman/etc/containers/storage.conf"
8384
[storage]
8485
driver = "overlay"

stacks/python/build.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ libffi-dev
1111
pkg-config
1212
libsqlite3-dev
1313
EOF
14-
export PATH="/opt/drycc/python/bin:$PATH"
15-
export C_INCLUDE_PATH="/opt/drycc/python/include"
16-
export CPLUS_INCLUDE_PATH="/opt/drycc/python/include"
17-
export LIBRARY_PATH="/opt/drycc/python/lib"
18-
export LD_LIBRARY_PATH="/opt/drycc/python/lib"
19-
export PKG_CONFIG_PATH="/opt/drycc/python/lib/pkg-config"
14+
mkdir /opt/drycc/python/profile.d
15+
cat << EOF > /opt/drycc/python/profile.d/python.sh
16+
export PATH="/opt/drycc/python/bin:\$PATH"
17+
export C_INCLUDE_PATH="/opt/drycc/python/include:\$C_INCLUDE_PATH"
18+
export CPLUS_INCLUDE_PATH="/opt/drycc/python/include:\$CPLUS_INCLUDE_PATH"
19+
export LIBRARY_PATH="/opt/drycc/python/lib:\$LIBRARY_PATH"
20+
export LD_LIBRARY_PATH="/opt/drycc/python/lib:\$LD_LIBRARY_PATH"
21+
export PKG_CONFIG_PATH="/opt/drycc/python/lib/pkg-config:\$PKG_CONFIG_PATH"
22+
EOF
23+
. /opt/drycc/python/profile.d/python.sh
2024
./make.sh
2125
cp -rf /opt/drycc/python /workspace/"${TARNAME}"/data
2226
}

stacks/rabbitmq/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ EOF
1717
cp "${TARNAME}"/data/rabbitmq/plugins/rabbitmq_management-*/priv/www/cli/rabbitmqadmin "${TARNAME}"/data/rabbitmq/sbin
1818
chmod +x "${TARNAME}"/data/rabbitmq/sbin/rabbitmqadmin
1919
rm -rf tmp.tar
20+
21+
mkdir "${TARNAME}"/data/rabbitmq/profile.d
22+
cat << EOF > "${TARNAME}"/data/rabbitmq/profile.d/rabbitmq.sh
23+
export PATH="/opt/drycc/rabbitmq/sbin:\$PATH"
24+
EOF
25+
2026
}
2127

2228
# call build stack

0 commit comments

Comments
 (0)