
Extends the build tools to add support to Kubernetes. For kubernetes, it supports single node cluster and host path for the volumes. New environment variables: - PROJECT: build project name - STX_PLATFORM: minikube or kubernetes - STX_BUILD_CPUS: replaces MINIKUBECPUS - STX_K8S_NAMESPACE: kubernetes namespace name * Default values are set to minikube, more details added in import-stx.README. To deploy stx on k8s you need to follow the below steps: - create k8s namespace - export PROJECT, included to support multiproject environments it is used by the new default build home and also for docker tagging. - export STX_BUILD_HOME, e.g: /localdisk/user/$PROJECT - export STX_K8S_NAMESPACE="namespace_name" - export STX_PLATFORM="kubernetes" - export KUBECONFIG to your kubernetes config file - STX_BUILD_CPUS replaces MINIKUBECPUS, this variable is used by build-pkgs parallel jobs ($MAX_CPUS) - Create your build home $STX_BUILD_HOME - Init repo & repo sync - source import-stx, check the env variables - stx-init-env - stx control status/start/stop/enter Test Plan: Pass: Create env on minikube Pass: Create env on Kubernetes Pass: Apply patch on current minikube env and continue to work on the environment without issues Pass: build package on Debian Pass: build Debian image Story: 2009812 Task: 44391 Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com> Change-Id: I7b760fbf1454f6aa90dd93dd9ff3a61d5fbd1b5c
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
# Common configuration for StarlingX builder
|
|
|
|
# Find the other rc files
|
|
BUILDRC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|
|
|
|
# Allow local overrides of env variables
|
|
if [[ -f $BUILDRC_DIR/localrc ]]; then
|
|
source $BUILDRC_DIR/localrc
|
|
fi
|
|
# Allow local overrides of env variables
|
|
if [[ -f $BUILDRC_DIR/buildrc ]]; then
|
|
source $BUILDRC_DIR/buildrc
|
|
fi
|
|
|
|
if [ ! -d $MY_REPO_ROOT_DIR ]; then
|
|
mkdir -p $MY_REPO_ROOT_DIR > /dev/null 2>&1
|
|
fi
|
|
if [ ! -d $MY_WORKSPACE ]; then
|
|
mkdir -p $MY_WORKSPACE > /dev/null 2>&1
|
|
fi
|
|
|
|
cat <<EOF
|
|
To ease checkout do:
|
|
!!!! Mandatory:
|
|
sudo apt-get update
|
|
git config --global user.name <username>
|
|
git config --global user.email <email>
|
|
|
|
If proxy used:
|
|
ssh -D 8080 -qTfnN <proxy host>
|
|
echo "alias wget='proxychains wget'" >>~/.bashrc
|
|
echo "alias repo='proxychains repo'" >>~/.bashrc
|
|
source ~/.bashrc
|
|
|
|
To start a fresh source tree:
|
|
cd \$MY_REPO_ROOT_DIR
|
|
repo init -u https://opendev.org/starlingx/manifest.git -m default.xml
|
|
repo sync
|
|
|
|
To download the sources & 3rd-party to local mirror:
|
|
downloader -b -s
|
|
|
|
To build all packages:
|
|
build-pkgs -a | build-pkgs -p <packageA,packageB...>
|
|
|
|
To make image:
|
|
build-image [ -t std|rt ]
|
|
|
|
EOF
|
|
|
|
cd ${MY_WORKSPACE}
|