mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy.git
synced 2026-03-20 03:40:49 +00:00
Compare commits
40 Commits
v2.4.2
...
v2.5.0-RC2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
390d29b575 | ||
|
|
c6afa01b7d | ||
|
|
9b19ae36df | ||
|
|
fe6ace5d0c | ||
|
|
c2ff9d995f | ||
|
|
d3eccd2d46 | ||
|
|
adb3b834dd | ||
|
|
065cab8fb6 | ||
|
|
f16171ab44 | ||
|
|
955ee6bc04 | ||
|
|
ffd9f9850b | ||
|
|
6502f60213 | ||
|
|
9749f9871f | ||
|
|
08b83ac56b | ||
|
|
0127bd5d27 | ||
|
|
152cfaa0bd | ||
|
|
129c68dc09 | ||
|
|
0d4efd37c8 | ||
|
|
9d82a191df | ||
|
|
0bebbca3dd | ||
|
|
7d0e0746e0 | ||
|
|
135ef24c82 | ||
|
|
5e17a7b980 | ||
|
|
0fcc67565e | ||
|
|
591277b5c4 | ||
|
|
5e77eedc76 | ||
|
|
2f1b59bec3 | ||
|
|
983d427d2f | ||
|
|
fab8de7a55 | ||
|
|
d80824845d | ||
|
|
5ceb12beb9 | ||
|
|
285b0a5533 | ||
|
|
c3eb565418 | ||
|
|
84179f82dc | ||
|
|
e2431e6074 | ||
|
|
9cba34e38d | ||
|
|
195d5e2cea | ||
|
|
2cefc802e9 | ||
|
|
bbd80c584e | ||
|
|
ce5ca91599 |
353
.github/git-release-tool/git-release-tool.sh
vendored
Executable file
353
.github/git-release-tool/git-release-tool.sh
vendored
Executable file
@@ -0,0 +1,353 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# git-release-tool
|
||||
# This script is used to manually cut releases for the TIP OpenWIFI CloudSDK 2.x repos
|
||||
# For other details, see "usage" function or simply run script
|
||||
|
||||
# Constants
|
||||
export PAGER=cat
|
||||
|
||||
# Internal vars
|
||||
LOG_VERBOSITY_NUMBER=0
|
||||
REPO_TAGS_ARRAY=()
|
||||
|
||||
# Helper functions
|
||||
## Logging functions
|
||||
log_notice() {
|
||||
echo "[Notice] "$1
|
||||
}
|
||||
|
||||
log_error() {
|
||||
if [[ "$LOG_VERBOSITY_NUMBER" -ge 0 ]]; then
|
||||
echo "[Error] "$1 >/dev/stderr
|
||||
fi
|
||||
}
|
||||
|
||||
log_info() {
|
||||
if [[ "$LOG_VERBOSITY_NUMBER" -ge 1 ]]; then
|
||||
echo "[Info] "$1
|
||||
fi
|
||||
}
|
||||
|
||||
log_debug() {
|
||||
if [[ "$LOG_VERBOSITY_NUMBER" -ge 2 ]]; then
|
||||
echo "[Debug] "$1
|
||||
fi
|
||||
}
|
||||
|
||||
## Usage info
|
||||
usage() {
|
||||
echo
|
||||
log_notice "$0 - script to cut releases for TIP OpenWIFI CloudSDK 2.x repos"
|
||||
log_notice
|
||||
log_notice "This script requires configuration file 'repositories.yaml' near the script and list of environment variables to work"
|
||||
log_notice
|
||||
log_notice "repositories.yaml file format:"
|
||||
echo "deploy_repo_url: git@github.com:Telecominfraproject/wlan-cloud-ucentral-deploy.git # modify if repo name changes"
|
||||
echo "repositories:"
|
||||
echo " - name: owgw-ui # should be the same as in image repository in helm values (i.e. tip-tip-wlan-cloud-ucentral.jfrog.io/owgw-ui)"
|
||||
echo " url: git@github.com:Telecominfraproject/wlan-cloud-owprov-ui.git # it's up to you to use SSH or HTTPS format and setup credentials for push/pull"
|
||||
echo " docker_compose_name: OWPROVUI # name of environment variable in docker-compose .env file containing image tag for the service"
|
||||
log_notice
|
||||
log_notice "List of required environment variables:"
|
||||
log_notice "- RELEASE_VERSION - release version that should be applied to repositories. Should comply release nameing policy (valid example - 'v2.0.0')"
|
||||
log_notice "- TAG_TYPE - type of tag that should be created for release (supported values - RC / FINAL)"
|
||||
log_notice "- GIT_PUSH_CONFIRMED - confirmation that any changes should be pushed to git (dry-run if unset, set to 'true' to enable)"
|
||||
log_notice
|
||||
log_notice "You may increase log verbosity by setting environment variable LOG_VERBOSITY to required level (ERROR/INFO/DEBUG)"
|
||||
#
|
||||
}
|
||||
|
||||
## Setting functions
|
||||
set_log_verbosity_number() {
|
||||
# Log verbosity levels:
|
||||
# 0 - ERROR
|
||||
# 1 - INFO
|
||||
# 2 - DEBUG
|
||||
case $LOG_VERBOSITY in
|
||||
ERROR )
|
||||
LOG_VERBOSITY_NUMBER=0
|
||||
;;
|
||||
INFO )
|
||||
LOG_VERBOSITY_NUMBER=1
|
||||
;;
|
||||
DEBUG )
|
||||
LOG_VERBOSITY_NUMBER=2
|
||||
;;
|
||||
* )
|
||||
log_notice "Setting LOG_VERBOSITY to INFO by default"
|
||||
LOG_VERBOSITY_NUMBER=1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
## Git manipulation functions
|
||||
modify_deploy_repo_values() {
|
||||
NEW_RELEASE_TAG=$1
|
||||
log_debug "NEW_RELEASE_TAG - $NEW_RELEASE_TAG"
|
||||
REPOSITORIES_AMOUNT=$(cat ../repositories.yaml | yq ".repositories[].name" -r | wc -l)
|
||||
for REPO_INDEX in $(seq 0 $(expr $REPOSITORIES_AMOUNT - 1)); do
|
||||
REPO_URL=$(cat ../repositories.yaml | yq ".repositories[$REPO_INDEX].url" -r)
|
||||
REPO_NAME_SUFFIXED=$(echo $REPO_URL | awk -F '/' '{print $NF}')
|
||||
REPO_NAME_WITHOUT_SUFFIX=${REPO_NAME_SUFFIXED%.git}
|
||||
REPO_DOCKER_COMPOSE_NAME=$(cat ../repositories.yaml | yq ".repositories[$REPO_INDEX].docker_compose_name" -r)
|
||||
SERVICE_TAG="${REPO_TAGS_ARRAY[$REPO_INDEX]}"
|
||||
log_debug "REPO_NAME_WITHOUT_SUFFIX - $REPO_NAME_WITHOUT_SUFFIX"
|
||||
sed "s/$REPO_DOCKER_COMPOSE_NAME=.*/$REPO_DOCKER_COMPOSE_NAME=$SERVICE_TAG/" -i docker-compose/.env
|
||||
sed "s/$REPO_DOCKER_COMPOSE_NAME=.*/$REPO_DOCKER_COMPOSE_NAME=$SERVICE_TAG/" -i docker-compose/.env.letsencrypt
|
||||
sed "s/$REPO_DOCKER_COMPOSE_NAME=.*/$REPO_DOCKER_COMPOSE_NAME=$SERVICE_TAG/" -i docker-compose/.env.selfsigned
|
||||
sed "/${REPO_NAME_WITHOUT_SUFFIX#*/}@/s/ref=.*/ref=$SERVICE_TAG\"/g" -i chart/Chart.yaml
|
||||
done
|
||||
LATEST_RELEASE_TAG=$(git tag | grep $CURRENT_RELEASE_VERSION | tail -1)
|
||||
if [[ "$(git diff | wc -l)" -eq "0" ]] && [[ "$(git diff $LATEST_RELEASE_TAG)" -eq "0" ]]; then
|
||||
log_info "No changes in microservices and since the latest tag are found, new release is not required"
|
||||
else
|
||||
sed 's/^version: .*/version: '${NEW_RELEASE_TAG#v}'/' chart/Chart.yaml -i
|
||||
if [[ "$GIT_PUSH_CONFIRMED" == "true" ]]; then
|
||||
log_info "Updating helm dependencies:"
|
||||
cd chart
|
||||
helm dependency update
|
||||
cd ..
|
||||
else
|
||||
log_info "Skipping helm charts update due to GIT_PUSH_CONFIRMED not being set to 'true'"
|
||||
fi
|
||||
fi
|
||||
git diff
|
||||
}
|
||||
|
||||
modify_values() {
|
||||
NEW_RELEASE_TAG=$1
|
||||
if [[ "$(basename $PWD)" == "deploy" ]]; then
|
||||
modify_deploy_repo_values $NEW_RELEASE_TAG
|
||||
else
|
||||
sed "/repository: tip-tip-wlan-cloud-ucentral.jfrog.io\/$(basename $PWD)/!b;n;s/tag: .*/tag: $NEW_RELEASE_TAG/" -i helm/values.yaml
|
||||
fi
|
||||
if [[ "$LOG_VERBOSITY_NUMBER" -ge 2 ]]; then
|
||||
log_debug "Diff to me commited:"
|
||||
git diff
|
||||
fi
|
||||
git add .
|
||||
git commit -m"Chg: update image tag in helm values to $NEW_RELEASE_TAG"
|
||||
}
|
||||
|
||||
push_changes() {
|
||||
CURRENT_RELEASE=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [[ "$GIT_PUSH_CONFIRMED" == "true" ]]; then
|
||||
log_info "Pushing branch changes and tags:"
|
||||
git push -u origin $CURRENT_RELEASE
|
||||
git push --tags
|
||||
else
|
||||
log_info "Skipping pushing of branch and tags due to GIT_PUSH_CONFIRMED not being set to 'true'"
|
||||
fi
|
||||
}
|
||||
|
||||
create_tag() {
|
||||
CURRENT_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | awk -F 'release/' '{print $2}')
|
||||
TAG_TYPE_LOWERED=$(echo $TAG_TYPE | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$TAG_TYPE_LOWERED" == "final" ]]; then
|
||||
log_debug "Creating final tag"
|
||||
modify_values $CURRENT_RELEASE_VERSION
|
||||
git tag $CURRENT_RELEASE_VERSION
|
||||
push_changes
|
||||
REPO_TAGS_ARRAY+=($CURRENT_RELEASE_VERSION)
|
||||
else
|
||||
log_debug "Checking if there are tags in the current release branch"
|
||||
LATEST_RELEASE_TAG=$(git tag | grep $CURRENT_RELEASE_VERSION | tail -1)
|
||||
log_debug "Latest release tag found - '$LATEST_RELEASE_TAG'"
|
||||
if [[ -z "$LATEST_RELEASE_TAG" ]]; then
|
||||
log_info "There are no tags in the release branch, creating the first one"
|
||||
NEW_RELEASE_TAG=$CURRENT_RELEASE_VERSION-RC1
|
||||
log_debug "New tag - $NEW_RELEASE_TAG"
|
||||
modify_values $NEW_RELEASE_TAG
|
||||
git tag $NEW_RELEASE_TAG
|
||||
push_changes
|
||||
REPO_TAGS_ARRAY+=($NEW_RELEASE_TAG)
|
||||
else
|
||||
if [[ "$(basename $PWD)" == "deploy" ]]; then
|
||||
NEW_RC=$(echo $LATEST_RELEASE_TAG | awk -F 'RC' '{print $2}')
|
||||
NEW_RC=$(expr $NEW_RC + 1)
|
||||
log_debug "New RC to create - $NEW_RC"
|
||||
NEW_RELEASE_TAG=$CURRENT_RELEASE_VERSION-RC$NEW_RC
|
||||
modify_deploy_repo_values $NEW_RELEASE_TAG
|
||||
if [[ "v$(cat chart/Chart.yaml | yq '.version' -r)" == "$NEW_RELEASE_TAG" ]]; then
|
||||
git add .
|
||||
git commit -m"Chg: update image tag in helm values to $NEW_RELEASE_TAG"
|
||||
git tag $NEW_RELEASE_TAG
|
||||
push_changes
|
||||
log_info "New tag $NEW_RELEASE_TAG was created and pushed"
|
||||
REPO_TAGS_ARRAY+=($NEW_RELEASE_TAG)
|
||||
else
|
||||
log_info "New tag for deploy repo is not required, saving existing one ($LATEST_RELEASE_TAG)"
|
||||
REPO_TAGS_ARRAY+=($LATEST_RELEASE_TAG)
|
||||
fi
|
||||
else
|
||||
log_debug "Checking if the latest tag is on the latest commit"
|
||||
LATEST_REVISION=$(git rev-parse HEAD)
|
||||
LATEST_RELEASE_TAG_REVISION=$(git rev-parse $LATEST_RELEASE_TAG)
|
||||
log_debug "Latest revision ----- $LATEST_REVISION"
|
||||
log_debug "Latest tag revision - $LATEST_RELEASE_TAG_REVISION"
|
||||
if [[ "$LATEST_REVISION" == "$LATEST_RELEASE_TAG_REVISION" ]]; then
|
||||
log_info "Existing tag $LATEST_RELEASE_TAG is pointing to the latest commit in the release branch"
|
||||
REPO_TAGS_ARRAY+=($LATEST_RELEASE_TAG)
|
||||
else
|
||||
NEW_RC=$(echo $LATEST_RELEASE_TAG | awk -F 'RC' '{print $2}')
|
||||
NEW_RC=$(expr $NEW_RC + 1)
|
||||
log_debug "New RC to create - $NEW_RC"
|
||||
NEW_RELEASE_TAG=$CURRENT_RELEASE_VERSION-RC$NEW_RC
|
||||
modify_values $NEW_RELEASE_TAG
|
||||
git tag $NEW_RELEASE_TAG
|
||||
push_changes
|
||||
log_info "New tag $NEW_RELEASE_TAG was created and pushed"
|
||||
REPO_TAGS_ARRAY+=($NEW_RELEASE_TAG)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_final_tag() {
|
||||
CURRENT_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | awk -F 'release/' '{print $2}')
|
||||
log_debug "Amount of final tags found - $(git tag | grep -x $CURRENT_RELEASE_VERSION | wc -l)"
|
||||
if [[ "$(git tag | grep -x $CURRENT_RELEASE_VERSION | wc -l)" -gt "0" ]]; then
|
||||
log_error "Final tag $CURRENT_RELEASE_VERSION already exists in release branch"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_git_tags() {
|
||||
CURRENT_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | awk -F 'release/' '{print $2}')
|
||||
RELEASE_TAGS_AMOUNT=$(git tag | grep $CURRENT_RELEASE_VERSION | wc -l)
|
||||
log_debug "Amount of tags linked with the release - $RELEASE_TAGS_AMOUNT"
|
||||
if [[ "$RELEASE_TAGS_AMOUNT" -gt "0" ]]; then
|
||||
check_final_tag
|
||||
fi
|
||||
create_tag
|
||||
}
|
||||
|
||||
check_release_branch() {
|
||||
RELEASE_BRANCH=$1
|
||||
git checkout $RELEASE_BRANCH -q
|
||||
check_git_tags
|
||||
}
|
||||
|
||||
create_release_branch() {
|
||||
git checkout -b release/$RELEASE_VERSION -q
|
||||
check_release_branch release/$RELEASE_VERSION
|
||||
}
|
||||
|
||||
check_if_release_branch_required() {
|
||||
LATEST_RELEASE_BRANCH=$(git branch -r | grep 'release/' | tail -1 | xargs)
|
||||
log_debug "Latest release branch available - $LATEST_RELEASE_BRANCH"
|
||||
if [[ -z "$LATEST_RELEASE_BRANCH" ]]; then
|
||||
log_info "Could not find a single release branch, creating it"
|
||||
create_release_branch $RELEASE_VERSION
|
||||
else
|
||||
LAST_RELEASE_DIFF_LINES_AMOUNT=$(git diff $LATEST_RELEASE_BRANCH ':(exclude)helm/values.yaml' | wc -l)
|
||||
if [[ "$LAST_RELEASE_DIFF_LINES_AMOUNT" -eq "0" ]]; then
|
||||
log_info "There are no changes in project since the latest release branch $LATEST_RELEASE_BRANCH so we will use tag from it"
|
||||
LATEST_RELEASE=$(echo $LATEST_RELEASE_BRANCH | awk -F 'origin/' '{print $2}')
|
||||
LATEST_RELEASE_TAG=$(git tag | grep -x $LATEST_RELEASE | tail -1)
|
||||
if [[ -z "$LATEST_RELEASE_TAG" ]]; then
|
||||
log_info "Could not find any tags for $LATEST_RELEASE release, creating it"
|
||||
check_release_branch $LATEST_RELEASE
|
||||
else
|
||||
log_info "Latest release tag found - $LATEST_RELEASE_TAG"
|
||||
REPO_TAGS_ARRAY+=($LATEST_RELEASE_TAG)
|
||||
fi
|
||||
else
|
||||
create_release_branch $RELEASE_VERSION
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
create_repo_version() {
|
||||
CWD=$PWD
|
||||
REPO_NAME=$1
|
||||
REPO_URL=$2
|
||||
rm -rf $REPO_NAME
|
||||
git clone -q $REPO_URL $REPO_NAME
|
||||
cd $REPO_NAME
|
||||
DEFAULT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
RELEASE_BRANCH=$(git branch -r | grep $RELEASE_VERSION | awk -F 'origin/' '{print $2}' | xargs)
|
||||
log_debug "Release branch to check - '$RELEASE_BRANCH'"
|
||||
if [[ ! -z "$RELEASE_BRANCH" ]]; then
|
||||
log_info "Release branch $RELEASE_BRANCH exists in the repository, checking if it has tags"
|
||||
check_release_branch $RELEASE_BRANCH
|
||||
else
|
||||
log_info "Release branch does not exists in the repository, checking if we need to create it"
|
||||
check_if_release_branch_required $DEFAULT_BRANCH
|
||||
fi
|
||||
log_info "Release commit info:"
|
||||
git show
|
||||
cd $CWD
|
||||
rm -rf $REPO_NAME
|
||||
}
|
||||
|
||||
# Log level setup
|
||||
set_log_verbosity_number
|
||||
|
||||
# Check system requirements
|
||||
if ! command -v yq &> /dev/null; then
|
||||
log_error "Command yq could not be found"
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
if ! command -v sed &> /dev/null; then
|
||||
log_error "Command sed could not be found"
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
if ! command -v helm &> /dev/null; then
|
||||
log_error "Command helm could not be found"
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$(helm plugin list | grep -wP '(helm-git|diff)' | wc -l)" -ne "2" ]]; then
|
||||
log_error "Helm plugins (helm-git and/or diff) are missing"
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Check variables
|
||||
log_debug "Release version: ${RELEASE_VERSION}"
|
||||
[ -z ${RELEASE_VERSION+x} ] && echo "RELEASE_VERSION is unset" && usage && exit 3
|
||||
echo "${RELEASE_VERSION}" | grep -xP "v(\d)+\.(\d)+\.\d+" >/dev/null || (log_error "RELEASE_VERSION is not in the right notation (correct example - v2.2.0)" && usage && exit 3)
|
||||
log_debug "Tag type: ${TAG_TYPE}"
|
||||
[ -z ${TAG_TYPE+x} ] && echo "TAG_TYPE is unset" && usage && exit 3
|
||||
echo "${TAG_TYPE}" | tr '[:upper:]' '[:lower:]' | grep -xP "(rc|final)" >/dev/null || (log_error "TAG_TYPE is not in the supported values ('rc' or 'final', case insensitive)" && usage && exit 3)
|
||||
|
||||
# Main body
|
||||
REPOSITORIES_AMOUNT=$(cat repositories.yaml | yq ".repositories[].name" -r | wc -l)
|
||||
DEPLOY_REPO_URL=$(cat repositories.yaml | yq ".deploy_repo_url" -r)
|
||||
log_debug "DEPLOY_REPO_URL - $DEPLOY_REPO_URL"
|
||||
|
||||
log_info "Checking repositories"
|
||||
log_info "Found $REPOSITORIES_AMOUNT repos to process"
|
||||
for REPO_INDEX in $(seq 0 $(expr $REPOSITORIES_AMOUNT - 1)); do
|
||||
echo
|
||||
REPO_NAME=$(cat repositories.yaml | yq ".repositories[$REPO_INDEX].name" -r)
|
||||
REPO_URL=$(cat repositories.yaml | yq ".repositories[$REPO_INDEX].url" -r)
|
||||
REPO_DOCKER_COMPOSE_NAME=$(cat repositories.yaml | yq ".repositories[$REPO_INDEX].docker_compose_name" -r)
|
||||
log_debug "REPO_NAME - $REPO_NAME"
|
||||
log_debug "REPO_URL - $REPO_URL"
|
||||
log_debug "REPO_DOCKER_COMPOSE_NAME - $REPO_DOCKER_COMPOSE_NAME"
|
||||
log_info "Processing repository '$REPO_NAME'"
|
||||
create_repo_version $REPO_NAME $REPO_URL
|
||||
done
|
||||
log_debug "Tags per project: ${REPO_TAGS_ARRAY[*]}"
|
||||
|
||||
echo
|
||||
log_info "Preparing changes in deploy repo"
|
||||
create_repo_version "deploy" $DEPLOY_REPO_URL
|
||||
|
||||
echo
|
||||
log_info "Services versions:"
|
||||
for REPO_INDEX in $(seq 0 $(expr $REPOSITORIES_AMOUNT - 1)); do
|
||||
REPO_NAME=$(cat repositories.yaml | yq ".repositories[$REPO_INDEX].name" -r)
|
||||
log_info "- $REPO_NAME - ${REPO_TAGS_ARRAY[$REPO_INDEX]}"
|
||||
done
|
||||
log_info "Deployment repo version - ${REPO_TAGS_ARRAY[-1]}"
|
||||
if [[ "$GIT_PUSH_CONFIRMED" != "true" ]]; then
|
||||
log_info "To apply changes described above, set GIT_PUSH_CONFIRMED to 'true' and rerun this script"
|
||||
fi
|
||||
20
.github/git-release-tool/repositories.yaml
vendored
Normal file
20
.github/git-release-tool/repositories.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
deploy_repo_url: https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy.git
|
||||
repositories:
|
||||
- name: owgw
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
|
||||
docker_compose_name: OWGW_TAG
|
||||
- name: owsec
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
|
||||
docker_compose_name: OWSEC_TAG
|
||||
- name: owfms
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-ucentralfms.git
|
||||
docker_compose_name: OWFMS_TAG
|
||||
- name: owgw-ui
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui.git
|
||||
docker_compose_name: OWGWUI_TAG
|
||||
- name: owprov-ui
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-owprov-ui.git
|
||||
docker_compose_name: OWPROVUI_TAG
|
||||
- name: owprov
|
||||
url: https://github.com/Telecominfraproject/wlan-cloud-owprov.git
|
||||
docker_compose_name: OWPROV_TAG
|
||||
22
.github/workflows/enforce-jira-issue-key.yml
vendored
Normal file
22
.github/workflows/enforce-jira-issue-key.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Ensure Jira issue is linked
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, edited, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
check_for_issue_key:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout actions repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/.github
|
||||
path: github
|
||||
|
||||
- name: Run JIRA check
|
||||
uses: ./github/composite-actions/enforce-jira-issue-key
|
||||
with:
|
||||
jira_base_url: ${{ secrets.TIP_JIRA_URL }}
|
||||
jira_user_email: ${{ secrets.TIP_JIRA_USER_EMAIL }}
|
||||
jira_api_token: ${{ secrets.TIP_JIRA_API_TOKEN }}
|
||||
59
.github/workflows/git-release.yml
vendored
Normal file
59
.github/workflows/git-release.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: Create new release for OpenWIFI 2.x services
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_version:
|
||||
description: 'Release version to create (i.e. v2.4.0)'
|
||||
required: true
|
||||
tag_type:
|
||||
default: 'rc'
|
||||
description: 'Tag type to create (final OR rc)'
|
||||
required: true
|
||||
push_confirm:
|
||||
default: ''
|
||||
description: 'Set to "true" if changes should be pushed (dry-run enabled by default)'
|
||||
required: false
|
||||
log_level:
|
||||
default: 'INFO'
|
||||
description: 'Log level for the script (ERROR/INFO/DEBUG)'
|
||||
required: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
create_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-cloud-ucentral-deploy
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
pip3 install yq
|
||||
helm plugin install https://github.com/databus23/helm-diff
|
||||
helm plugin install https://github.com/aslafy-z/helm-git
|
||||
ls ~/.local/share/helm/plugins/helm-git/helm-git-plugin.sh || true
|
||||
sed 's/--skip-refresh //' -i ~/.local/share/helm/plugins/helm-git/helm-git-plugin.sh
|
||||
|
||||
- name: Run release creation script
|
||||
working-directory: wlan-cloud-ucentral-deploy/.github/git-release-tool
|
||||
run: |
|
||||
export RELEASE_VERSION=${{ github.event.inputs.release_version }}
|
||||
export TAG_TYPE=${{ github.event.inputs.tag_type }}
|
||||
export GIT_PUSH_CONFIRMED=${{ github.event.inputs.push_confirm }}
|
||||
export LOG_VERBOSITY=${{ github.event.inputs.log_level }}
|
||||
mkdir -p ~/.ssh
|
||||
chmod -R 700 ~/.ssh
|
||||
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
||||
echo https://tip-automation:${{ secrets.GIT_PUSH_PAT }}@github.com > ~/.git-credentials
|
||||
git config --global credential.helper store
|
||||
git config --global user.email "tip-automation@telecominfraproject.com"
|
||||
git config --global user.name "TIP Automation User"
|
||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
helm repo update
|
||||
./git-release-tool.sh
|
||||
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@@ -22,22 +22,22 @@ jobs:
|
||||
path: wlan-cloud-ucentral-deploy
|
||||
repository: Telecominfraproject/wlan-cloud-ucentral-deploy
|
||||
|
||||
- name: Run pre-checks
|
||||
working-directory: wlan-cloud-ucentral-deploy/chart
|
||||
run: |
|
||||
pip3 install yq -q
|
||||
export CHART_VERSION=$(cat Chart.yaml | yq .version -r)
|
||||
export GIT_TAG=$(echo ${GITHUB_REF} | sed -e 's/refs\/tags\/[v]//' | tr '/' '-')
|
||||
if [ "$CHART_VERSION" != "$GIT_TAG" ]; then
|
||||
echo "Chart version in Chart.yaml ($CHART_VERSION) is different from Git tag ($GIT_TAG)";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(cat Chart.yaml | yq '.dependencies[].repository' -r | grep -E 'ref=(main|master)' | wc -l)" != "0" ]; then
|
||||
echo "Some of the dependencies does not have a fixed version set. List of affected dependencies:";
|
||||
cat Chart.yaml | yq '.dependencies[].repository' -r | grep -E 'ref=(main|master)';
|
||||
exit 1
|
||||
fi
|
||||
# - name: Run pre-checks
|
||||
# working-directory: wlan-cloud-ucentral-deploy/chart
|
||||
# run: |
|
||||
# pip3 install yq -q
|
||||
# export CHART_VERSION=$(cat Chart.yaml | yq .version -r)
|
||||
# export GIT_TAG=$(echo ${GITHUB_REF} | sed -e 's/refs\/tags\/[v]//' | tr '/' '-')
|
||||
# if [ "$CHART_VERSION" != "$GIT_TAG" ]; then
|
||||
# echo "Chart version in Chart.yaml ($CHART_VERSION) is different from Git tag ($GIT_TAG)";
|
||||
# exit 1
|
||||
# fi
|
||||
#
|
||||
# if [ "$(cat Chart.yaml | yq '.dependencies[].repository' -r | grep -E 'ref=(main|master)' | wc -l)" != "0" ]; then
|
||||
# echo "Some of the dependencies does not have a fixed version set. List of affected dependencies:";
|
||||
# cat Chart.yaml | yq '.dependencies[].repository' -r | grep -E 'ref=(main|master)';
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
- name: Build package
|
||||
working-directory: wlan-cloud-ucentral-deploy/chart
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
*.swp
|
||||
chart/charts/*
|
||||
/docker-compose/certs/
|
||||
/docker-compose/*_data
|
||||
/docker-compose/owls/*_data
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
dependencies:
|
||||
- name: owgw
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=master
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: owsec
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=main
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: owfms
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=main
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: owprov
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=main
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: owgwui
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=main
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: owprovui
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=main
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=v2.5.0-RC1
|
||||
version: 0.1.0
|
||||
- name: rttys
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-rtty@chart?ref=main
|
||||
@@ -23,5 +23,14 @@ dependencies:
|
||||
- name: kafka
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 13.0.2
|
||||
digest: sha256:3de20b44745484d6e2980d34b3d9e95c92b93537facb2a0bb62c75e583ef444f
|
||||
generated: "2021-10-26T16:27:32.319129019+03:00"
|
||||
- name: owls
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owls@helm?ref=main
|
||||
version: 0.1.0
|
||||
- name: owlsui
|
||||
repository: git+https://github.com/Telecominfraproject/wlan-cloud-owls-ui@helm?ref=master
|
||||
version: 0.1.0
|
||||
- name: haproxy
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 0.2.21
|
||||
digest: sha256:44b4e5b6c7eee42a3c7d9de22896283acd8e5cc14f9cc597f314c67f300b2c2a
|
||||
generated: "2022-02-11T16:34:37.809225701Z"
|
||||
|
||||
@@ -2,31 +2,41 @@ apiVersion: v2
|
||||
name: openwifi
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
version: 0.1.0
|
||||
version: 2.5.0-RC2
|
||||
dependencies:
|
||||
- name: owgw
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=master"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: owsec
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=main"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: owfms
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=main"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: owprov
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=main"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: owgwui
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=main"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: owprovui
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=main"
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=v2.5.0-RC1"
|
||||
version: 0.1.0
|
||||
- name: rttys
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-rtty@chart?ref=main"
|
||||
version: 0.1.0
|
||||
condition: rttys.enabled
|
||||
- name: kafka
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 13.0.2
|
||||
condition: kafka.enabled
|
||||
- name: owls
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owls@helm?ref=main"
|
||||
version: 0.1.0
|
||||
condition: owls.enabled
|
||||
- name: owlsui
|
||||
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owls-ui@helm?ref=master"
|
||||
version: 0.1.0
|
||||
condition: owlsui.enabled
|
||||
- name: haproxy
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 0.2.21
|
||||
condition: haproxy.enabled
|
||||
|
||||
121
chart/README.md
121
chart/README.md
@@ -7,6 +7,7 @@ This Helm chart helps to deploy OpenWIFI Cloud SDK with all required dependencie
|
||||
[helm-git](https://github.com/aslafy-z/helm-git) is required for remote the installation as it pull charts from other repositories for the deployment, so intall it if you don't have it already.
|
||||
|
||||
```bash
|
||||
$ helm dependency update
|
||||
$ helm install .
|
||||
```
|
||||
|
||||
@@ -20,23 +21,35 @@ Current dependencies may be found in [chart definition](Chart.yaml) and list wil
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
There are multiple ways to install this chart. Described commands will deploy the OpenWIFI Cloud SDK on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that will be overwritten above default values from dependent charts.
|
||||
|
||||
### Installation using local git repo
|
||||
|
||||
To install the chart from local git repo with the release name `my-release` you need to first update dependencies as it is required with dependencies deployed by helm-git:
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release git+https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=main
|
||||
$ helm dependency update
|
||||
$ helm install .
|
||||
```
|
||||
|
||||
The command deploys the OpenWIFI Cloud SDK on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that will be overwritten above default values from dependent charts.
|
||||
### Installation using remote chart
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
If you need to update your release, it could be required to update your helm charts dependencies before installation:
|
||||
To install the chart with the release name `my-release` you need to first update dependencies as it is required with dependencies deployed by helm-git:
|
||||
|
||||
```bash
|
||||
helm dependency update
|
||||
$ helm install --name my-release git+https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy@chart/openwifi-0.1.0.tgz?ref=main
|
||||
```
|
||||
|
||||
#### Required password changing on the first startup
|
||||
### Installation using external repo
|
||||
|
||||
This approach requires adding external helm repo and new versions are build for every [release](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/releases):
|
||||
|
||||
```bash
|
||||
helm repo add tip-wlan https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
|
||||
helm install my-release tip-wlan/openwifi
|
||||
```
|
||||
|
||||
## Required password changing on the first startup
|
||||
|
||||
One important action that must be done before using the deployment is changing password for the default user in owsec as described in [owsec docs](https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/tree/main#changing-default-password). Please use these docs to find the actions that must be done **after** the deployment in order to start using your deployment.
|
||||
|
||||
@@ -62,6 +75,8 @@ The following table lists the configurable parameters that overrides microservic
|
||||
| `owsec.configProperties."openwifi\.kafka\.brokerlist"` | string | Sets up Kafka broker list for OpenWIFI Security to the predictable Kubernetes service name (see `kafka.fullnameOverride` option description for details) | `'kafka:9092'` |
|
||||
| `owfms.configProperties."openwifi\.kafka\.enable"` | string | Configures OpenWIFI Firmware to use Kafka for communication | `'true'` |
|
||||
| `owfms.configProperties."openwifi\.kafka\.brokerlist"` | string | Sets up Kafka broker list for OpenWIFI Firmware to the predictable Kubernetes service name (see `kafka.fullnameOverride` option description for details) | `'kafka:9092'` |
|
||||
| `owprov.configProperties."openwifi\.kafka\.enable"` | string | Configures OpenWIFI Provisioning to use Kafka for communication | `'true'` |
|
||||
| `owprov.configProperties."openwifi\.kafka\.brokerlist"` | string | Sets up Kafka broker list for OpenWIFI Provisioning to the predictable Kubernetes service name (see `kafka.fullnameOverride` option description for details) | `'kafka:9092'` |
|
||||
| `rttys.enabled` | boolean | Enables [rttys](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-rtty) deployment | `True` |
|
||||
| `rttys.config.token` | string | Sets default rttys token | |
|
||||
| `kafka.enabled` | boolean | Enables [kafka](https://github.com/bitnami/charts/blob/master/bitnami/kafka/) deployment | `True` |
|
||||
@@ -70,6 +85,21 @@ The following table lists the configurable parameters that overrides microservic
|
||||
| `kafka.image.repository` | string | Kafka Docker image repository | `'bitnami/kafka'` |
|
||||
| `kafka.image.tag` | string | Kafka Docker image tag | `'2.8.0-debian-10-r43'` |
|
||||
| `kafka.minBrokerId` | number | Sets Kafka minimal broker ID (useful for multi-node Kafka installations) | `100` |
|
||||
| `clustersysteminfo.enabled` | boolean | Enables post-install check that makes sure that all services are working correctly using systeminfo RESTAPI method | `false` |
|
||||
| `clustersysteminfo.delay` | integer | Number of seconds to delay clustersysteminfo execution | `0` |
|
||||
| `clustersysteminfo.public_env_variables` | hash | Map of public environment variables that will be passed to the script (required for configuration) | |
|
||||
| `clustersysteminfo.secret_env_variables` | hash | Map of secret environment variables that will be passed to the script (for example, password) | |
|
||||
| `clustersysteminfo.activeDeadlineSeconds` | integer | Number of seconds that are allowed for job to run before failing with Dealine Exceeded error | `2400` |
|
||||
| `clustersysteminfo.backoffLimit` | integer | Number of jobs retries before job failure | `5` |
|
||||
| `owls.enabled` | boolean | Install OpenWIFI Load Simulator in the release | `false` |
|
||||
| `owls.configProperties."openwifi\.kafka\.enable"` | string | Configures OpenWIFI Load Simulator to use Kafka for communication | `'true'` |
|
||||
| `owls.configProperties."openwifi\.kafka\.brokerlist"` | string | Sets up Kafka broker list for OpenWIFI Load Simulator to the predictable Kubernetes service name (see `kafka.fullnameOverride` option description for details) | `'kafka:9092'` |
|
||||
| `owlsui.enabled` | boolean | Install OpenWIFI Load Simulator Web UI in the release | `false` |
|
||||
| `haproxy.enabled` | boolean | Install HAproxy as a unified TCP proxy for services | `true` |
|
||||
| `haproxy.replicaCount` | Integer | Amount of HAproxy pods to start | `3` |
|
||||
| `restapiCerts.enabled` | boolean | Enable generation of self-signed certificates for REST API private endpoints (see details below) | `false` |
|
||||
| `restapiCerts.services` | array | List of services that require certificates generation | |
|
||||
| `restapiCerts.clusterDomain` | string | Kubernetes cluster domain | `cluster.local` |
|
||||
|
||||
If required, further overrides may be passed. They will be merged with default values from this chart and other subcharts with priority to values you'll pass.
|
||||
|
||||
@@ -90,3 +120,78 @@ $ helm install --name my-release -f values.yaml .
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml) as a base for customization.
|
||||
|
||||
## Optional features
|
||||
|
||||
Some features of the SDK are not enabled by default, but you may enable them by changing your values file. Below you may find information about supported features and values that may be used as a base to enable these changes. As an example of used values you may check values files in [wlan-testing](https://github.com/Telecominfraproject/wlan-testing/tree/master/helm/ucentral) repository that are used for different automated testing pipelines.
|
||||
|
||||
If you want to enable different features, you may try passing additional values files using `-f` flag during `helm install/upgrade` commands.
|
||||
|
||||
### Cluster systeminfo check
|
||||
|
||||
By setting `clusterinfo.enabled` to `true` you may enable job on post-install/post-upgrade step that will do the following:
|
||||
|
||||
1. Change default security credentials from credentials set in OWSEC configuration file (see 'Required password changing on the first startup' block above)
|
||||
2. Check if all services started responding correctly after the deployment using systeminfo REST API method
|
||||
|
||||
In order to do that, you need to additionaly set multiple parameters:
|
||||
|
||||
1. clusterinfo.public_env_variables.OWSEC - OWSEC endpoint to use for CLI tools
|
||||
2. clusterinfo.secret_env_variables.OWSEC_DEFAULT_USERNAME - username used for CLI requests (see OWSEC configuration file for details)
|
||||
3. clusterinfo.secret_env_variables.OWSEC_DEFAULT_PASSWORD - default password stored in OWSEC configuration that is required for initial password change
|
||||
4. clusterinfo.secret_env_variables.OWSEC_NEW_PASSWORD - new password that should be set instead of default OWSEC password. It is set only once, then used all the time. Password must comply https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/#authenticationvalidationexpression
|
||||
|
||||
If you are interested in script itself, see [script](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/blob/main/chart/docker/clustersysteminfo).
|
||||
|
||||
You may see example values to enable this feature in [values.enable-clustersysteminfo.yaml](./feature-values/values.enable-clustersysteminfo.yaml).
|
||||
|
||||
### Load simulation
|
||||
|
||||
Chart also allows to install [OWLS](https://github.com/Telecominfraproject/wlan-cloud-owls) and [OWLS-UI](https://github.com/Telecominfraproject/wlan-cloud-owls-ui) alongside your installation if you are interested in load testing your installation. See services repositories for available options and configuration details.
|
||||
|
||||
You may see example values to enable this feature in [values.enable-owls.yaml](./feature-values/values.enable-owls.yaml).
|
||||
|
||||
### HAproxy
|
||||
|
||||
In order to use single point of entry for all services (may be used for one cloud Load Balancer per installation) HAproxy is installed by default with other services. HAproxy is working in TCP proxy mode, so every TLS certificate is managed by services themself, while it is possible to pass requests from cloud load balancer to services using same ports (configuration of cloud load balancer may vary from cloud provider to provider).
|
||||
|
||||
By default this option is enabled, but you may disable it and make per-service LoadBalancer using values in [values.disable-haproxy.yaml](./feature-values/values.disable-haproxy.yaml).
|
||||
|
||||
### OWGW unsafe sysctls
|
||||
|
||||
By default Linux is using quite adeqate sysctl values for TCP keepalive, but OWGW may keep disconnected APs in stuck state preventing it from connecting back. This may be changed by setting some sysctls to lower values:
|
||||
|
||||
- net.ipv4.tcp_keepalive_intvl
|
||||
- net.ipv4.tcp_keepalive_probes - 2
|
||||
- net.ipv4.tcp_keepalive_time - 45
|
||||
|
||||
However this change is [not considered safe by Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls) and it requires to pass additional argument to your Kubelets services in your Kubernetes cluster:
|
||||
|
||||
```
|
||||
--allowed-unsafe-sysctls net.ipv4.tcp_keepalive_intvl,net.ipv4.tcp_keepalive_probes,net.ipv4.tcp_keepalive_time
|
||||
```
|
||||
|
||||
After this change you may pass additional parameters to OWGW helm chart. You may see example values in [values.owgw-unsafe-sysctl.yaml](./feature-values/values.owgw-unsafe-sysctl.yaml)
|
||||
|
||||
### Private REST API cert-manager managed certificates
|
||||
|
||||
All services have 2 REST API endpoints - private and public one. Private endpoint is used for inter-service communication and should not be exposed to the world, but since it also requires TLS in order to work correctly, additional optional logic was implemented that allows to manage TLS certificates for such endpoints to be managed by [cert-manager](https://github.com/jetstack/cert-manager). In order to activate this feature following steps are required:
|
||||
|
||||
0. Install and configure [cert-manager](https://cert-manager.io/docs/) in your cluster
|
||||
1. Enable option by setting `restapiCerts.enabled`
|
||||
2. If you have a different Kubernetes cluster domain, adapt `restapiCerts.clusterDomain` to your cluster domain
|
||||
3. Add additional parameters for services in order to mount certificates secrets in pods, use certificates by service and add public environment variable that will add cert-manager managed CA certificate to pod's trusted chain (see [OWGW docker-entrypoint.sh](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/docker-entrypoint.sh) as example of how it is done)
|
||||
|
||||
You may see example values to enable this feature in [values.restapi-certmanager-certs.yaml](./feature-values/values.restapi-certmanager-certs.yaml).
|
||||
|
||||
## Environment specific values
|
||||
|
||||
This repository contains values files that may be used in the same manner as feature values above to deploy to specific runtime envionemnts (including different cloud deployments).
|
||||
|
||||
Some environments are using [external-dns](https://github.com/kubernetes-sigs/external-dns) service to dynamically set DNS records, but you may manage your records manually
|
||||
|
||||
### AWS EKS
|
||||
|
||||
EKS based installation assumes that you are using [AWS Load Balancer controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller) so that all required ALBs and NLBs are created automatically. Also it is assumed that you have Route53 managed DNS zone and you've issued wildcard certificate for one of your zones that may be used by Load Balancers.
|
||||
|
||||
You may see example values for this environment in [values.aws.yaml](./environment-values/values.aws.yaml).
|
||||
|
||||
@@ -44,17 +44,9 @@ then
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Adapt scripts for the security credentials
|
||||
# -> Username
|
||||
sed '/^username/s/username=.*/username="'$OWSEC_DEFAULT_USERNAME'"/' owsec_cli -i
|
||||
sed '/^username/s/username=.*/username="'$OWSEC_DEFAULT_USERNAME'"/' owgw_cli -i
|
||||
sed '/^username/s/username=.*/username="'$OWSEC_DEFAULT_USERNAME'"/' owfms_cli -i
|
||||
sed '/^username/s/username=.*/username="'$OWSEC_DEFAULT_USERNAME'"/' owprov_cli -i
|
||||
# -> Password
|
||||
sed '/^password/s/password=.*/password="'$OWSEC_NEW_PASSWORD'"/' owsec_cli -i
|
||||
sed '/^password/s/password=.*/password="'$OWSEC_NEW_PASSWORD'"/' owgw_cli -i
|
||||
sed '/^password/s/password=.*/password="'$OWSEC_NEW_PASSWORD'"/' owfms_cli -i
|
||||
sed '/^password/s/password=.*/password="'$OWSEC_NEW_PASSWORD'"/' owprov_cli -i
|
||||
# Prepare security credentials for cli usage
|
||||
export OWSEC_USERNAME=${OWSEC_DEFAULT_USERNAME}
|
||||
export OWSEC_PASSWORD=${OWSEC_NEW_PASSWORD}
|
||||
|
||||
echo "Running systeminfo checks for all components until all of them are available OR check tries are exausted ($CHECK_RETRIES)"
|
||||
exit_code_sum=1
|
||||
|
||||
91
chart/environment-values/values.aws.yaml
Normal file
91
chart/environment-values/values.aws.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
# TODO adapt config for your environments - change FQDNs, certificates and security credentials
|
||||
owgw:
|
||||
configProperties: # TODO change FQDNs
|
||||
openwifi.fileuploader.host.0.name: gw.cicd.lab.wlan.tip.build
|
||||
openwifi.system.uri.public: https://gw.cicd.lab.wlan.tip.build:16002
|
||||
openwifi.system.uri.private: https://gw.cicd.lab.wlan.tip.build:17002
|
||||
openwifi.system.uri.ui: https://webui.cicd.lab.wlan.tip.build
|
||||
rtty.server: rtty.cicd.lab.wlan.tip.build
|
||||
rtty.token: TOFILL # TODO change rttys token to the same used in rttys below
|
||||
|
||||
owgwui:
|
||||
ingresses:
|
||||
default:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: alb
|
||||
alb.ingress.kubernetes.io/scheme: internet-facing
|
||||
alb.ingress.kubernetes.io/group.name: wlan-cicd
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285 # TODO change certificate
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/hostname: webui.cicd.lab.wlan.tip.build # TODO change FQDN
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owgwui
|
||||
servicePort: http
|
||||
|
||||
public_env_variables:
|
||||
DEFAULT_UCENTRALSEC_URL: https://sec.cicd.lab.wlan.tip.build:16001 # TODO change to OWSEC RESTAPI url
|
||||
|
||||
owsec:
|
||||
configProperties: # TODO change FQDNs and credentials
|
||||
authentication.default.username: tip@ucentral.com
|
||||
authentication.default.password: TOFILL # TODO change password to default hashed password (see OWSEC readme for details)
|
||||
openwifi.system.uri.public: https://sec.cicd.lab.wlan.tip.build:16001
|
||||
openwifi.system.uri.private: https://sec.cicd.lab.wlan.tip.build:17001
|
||||
openwifi.system.uri.ui: https://webui.cicd.lab.wlan.tip.build
|
||||
|
||||
owfms:
|
||||
configProperties: # TODO change FQDNs and credentials
|
||||
s3.key: TOFILL # TODO change these values to S3 credentials to get firmwares from bucket
|
||||
s3.secret: TOFILL
|
||||
# TODO uncomment and change these values if you are using your own S3 bucket with firmwares
|
||||
#s3.bucketname: ucentral-ap-firmware
|
||||
#s3.region: us-east-1
|
||||
#s3.bucket.uri: ucentral-ap-firmware.s3.amazonaws.com
|
||||
openwifi.system.uri.public: https://fms.cicd.lab.wlan.tip.build:16001
|
||||
openwifi.system.uri.private: https://fms.cicd.lab.wlan.tip.build:17001
|
||||
openwifi.system.uri.ui: https://webui.cicd.lab.wlan.tip.build
|
||||
|
||||
owprov:
|
||||
configProperties: # TODO change FQDNs
|
||||
openwifi.system.uri.public: https://prov.cicd.lab.wlan.tip.build:16001
|
||||
openwifi.system.uri.private: https://prov.cicd.lab.wlan.tip.build:17001
|
||||
openwifi.system.uri.ui: https://webui.cicd.lab.wlan.tip.build
|
||||
|
||||
owprovui:
|
||||
ingresses:
|
||||
default:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: alb
|
||||
alb.ingress.kubernetes.io/scheme: internet-facing
|
||||
alb.ingress.kubernetes.io/group.name: wlan-cicd
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285 # TODO change certificate
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/hostname: provui.cicd.lab.wlan.tip.build # TODO change FQDN
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owprovui
|
||||
servicePort: http
|
||||
|
||||
public_env_variables:
|
||||
DEFAULT_UCENTRALSEC_URL: https://sec.cicd.lab.wlan.tip.build:16001 # TODO change to OWSEC RESTAPI url
|
||||
|
||||
rttys:
|
||||
config:
|
||||
token: TOFILL # TODO change rttys token and set it in OWGW section above
|
||||
|
||||
haproxy:
|
||||
service:
|
||||
annotations:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "8080"
|
||||
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285 # TODO change certificate
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913"
|
||||
service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
|
||||
external-dns.alpha.kubernetes.io/hostname: "gw.cicd.lab.wlan.tip.build,sec.cicd.lab.wlan.tip.build,fms.cicd.lab.wlan.tip.build,prov.cicd.lab.wlan.tip.build,rtty.cicd.lab.wlan.tip.build"
|
||||
|
||||
27
chart/feature-values/values.disable-haproxy.yaml
Normal file
27
chart/feature-values/values.disable-haproxy.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
owgw:
|
||||
services:
|
||||
owgw:
|
||||
type: LoadBalancer
|
||||
|
||||
owsec:
|
||||
services:
|
||||
owsec:
|
||||
type: LoadBalancer
|
||||
|
||||
rttys:
|
||||
services:
|
||||
rttys:
|
||||
type: LoadBalancer
|
||||
|
||||
owfms:
|
||||
services:
|
||||
owfms:
|
||||
type: LoadBalancer
|
||||
|
||||
owprov:
|
||||
services:
|
||||
owprov:
|
||||
type: LoadBalancer
|
||||
|
||||
haproxy:
|
||||
enabled: false
|
||||
15
chart/feature-values/values.enable-clustersysteminfo.yaml
Normal file
15
chart/feature-values/values.enable-clustersysteminfo.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
clustersysteminfo:
|
||||
enabled: true
|
||||
delay: 0 # you may change this if you need to wait for DNS propogation or other things
|
||||
|
||||
public_env_variables:
|
||||
OWSEC: owsec-owsec:16001
|
||||
# Uncomment these options if you want to run systeminfo checks inside of cluster
|
||||
#OWGW_OVERRIDE: owgw-owgw:16002
|
||||
#OWFMS_OVERRIDE: owfms-owfms:16004
|
||||
#OWPROV_OVERRIDE: owprov-owprov:16005
|
||||
|
||||
secret_env_variables:
|
||||
OWSEC_DEFAULT_USERNAME: tip@ucentral.com
|
||||
OWSEC_DEFAULT_PASSWORD: openwifi
|
||||
OWSEC_NEW_PASSWORD: TOFILL # TODO adapt password to your new password with password policy in mind
|
||||
9
chart/feature-values/values.enable-owls.yaml
Normal file
9
chart/feature-values/values.enable-owls.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
owgw:
|
||||
configProperties:
|
||||
simulatorid: 53494D020202 # This value should be set to serial number of certificate that was provided to OWLS
|
||||
|
||||
owls:
|
||||
enabled: true
|
||||
|
||||
owlsui:
|
||||
enabled: true
|
||||
12
chart/feature-values/values.owgw-unsafe-sysctl.yaml
Normal file
12
chart/feature-values/values.owgw-unsafe-sysctl.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
owgw:
|
||||
securityContext:
|
||||
sysctls:
|
||||
- name: net.ipv4.tcp_keepalive_intvl
|
||||
value: "5"
|
||||
- name: net.ipv4.tcp_keepalive_probes
|
||||
value: "2"
|
||||
- name: net.ipv4.tcp_keepalive_time
|
||||
value: "45"
|
||||
|
||||
podSecurityPolicy:
|
||||
enabled: true
|
||||
183
chart/feature-values/values.restapi-certmanager-certs.yaml
Normal file
183
chart/feature-values/values.restapi-certmanager-certs.yaml
Normal file
@@ -0,0 +1,183 @@
|
||||
owgw:
|
||||
public_env_variables:
|
||||
SELFSIGNED_CERTS: "true"
|
||||
|
||||
configProperties:
|
||||
openwifi.internal.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.internal.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.internal.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
|
||||
openwifi.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
|
||||
|
||||
volumes:
|
||||
owgw:
|
||||
- name: config
|
||||
mountPath: /owgw-data/owgw.properties
|
||||
subPath: owgw.properties
|
||||
# Template below will be rendered in template
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owgw.fullname" . }}-config
|
||||
- name: certs
|
||||
mountPath: /owgw-data/certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owgw.fullname" . }}-certs
|
||||
- name: certs-cas
|
||||
mountPath: /owgw-data/certs/cas
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owgw.fullname" . }}-certs-cas
|
||||
- name: persist
|
||||
mountPath: /owgw-data/persist
|
||||
volumeDefinition: |
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "owgw.fullname" . }}-pvc
|
||||
|
||||
- name: restapi-certs
|
||||
mountPath: /owgw-data/certs/restapi-certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
|
||||
- name: restapi-ca
|
||||
mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
||||
subPath: ca.crt
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
|
||||
|
||||
owsec:
|
||||
public_env_variables:
|
||||
SELFSIGNED_CERTS: "true"
|
||||
|
||||
configProperties:
|
||||
openwifi.internal.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.internal.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.internal.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
|
||||
openwifi.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
|
||||
|
||||
volumes:
|
||||
owsec:
|
||||
- name: config
|
||||
mountPath: /owsec-data/owsec.properties
|
||||
subPath: owsec.properties
|
||||
# Template below will be rendered in template
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owsec.fullname" . }}-config
|
||||
- name: certs
|
||||
mountPath: /owsec-data/certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owsec.fullname" . }}-certs
|
||||
- name: persist
|
||||
mountPath: /owsec-data/persist
|
||||
volumeDefinition: |
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "owsec.fullname" . }}-pvc
|
||||
|
||||
- name: restapi-certs
|
||||
mountPath: /owsec-data/certs/restapi-certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
|
||||
- name: restapi-ca
|
||||
mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
||||
subPath: ca.crt
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
|
||||
|
||||
owfms:
|
||||
public_env_variables:
|
||||
SELFSIGNED_CERTS: "true"
|
||||
|
||||
configProperties:
|
||||
openwifi.internal.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.internal.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.internal.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
|
||||
openwifi.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
|
||||
|
||||
volumes:
|
||||
owfms:
|
||||
- name: config
|
||||
mountPath: /owfms-data/owfms.properties
|
||||
subPath: owfms.properties
|
||||
# Template below will be rendered in template
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owfms.fullname" . }}-config
|
||||
- name: certs
|
||||
mountPath: /owfms-data/certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owfms.fullname" . }}-certs
|
||||
- name: persist
|
||||
mountPath: /owfms-data/persist
|
||||
volumeDefinition: |
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "owfms.fullname" . }}-pvc
|
||||
|
||||
- name: restapi-certs
|
||||
mountPath: /owfms-data/certs/restapi-certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
|
||||
- name: restapi-ca
|
||||
mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
||||
subPath: ca.crt
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
|
||||
|
||||
owprov:
|
||||
public_env_variables:
|
||||
SELFSIGNED_CERTS: "true"
|
||||
|
||||
configProperties:
|
||||
openwifi.internal.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.internal.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.internal.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
|
||||
openwifi.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
|
||||
openwifi.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
|
||||
openwifi.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
|
||||
|
||||
volumes:
|
||||
owprov:
|
||||
- name: config
|
||||
mountPath: /owprov-data/owprov.properties
|
||||
subPath: owprov.properties
|
||||
# Template below will be rendered in template
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owprov.fullname" . }}-config
|
||||
- name: certs
|
||||
mountPath: /owprov-data/certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owprov.fullname" . }}-certs
|
||||
- name: persist
|
||||
mountPath: /owprov-data/persist
|
||||
volumeDefinition: |
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "owprov.fullname" . }}-pvc
|
||||
|
||||
- name: restapi-certs
|
||||
mountPath: /owprov-data/certs/restapi-certs
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
|
||||
- name: restapi-ca
|
||||
mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
||||
subPath: ca.crt
|
||||
volumeDefinition: |
|
||||
secret:
|
||||
secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
|
||||
|
||||
restapiCerts:
|
||||
enabled: true
|
||||
51
chart/templates/certificate-restapi.yaml
Normal file
51
chart/templates/certificate-restapi.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
{{- $root := . -}}
|
||||
{{- if .Values.restapiCerts.enabled }}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: ow-wildcard
|
||||
spec:
|
||||
secretName: ow-wildcard-tls
|
||||
commonName: {{ .Release.Namespace }}.svc.{{ .Values.restapiCerts.clusterDomain }}
|
||||
isCA: true
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
issuerRef:
|
||||
name: selfsigned-issuer
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: ow-ca-issuer
|
||||
spec:
|
||||
ca:
|
||||
secretName: ow-wildcard-tls
|
||||
{{ range .Values.restapiCerts.services }}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ . }}-restapi
|
||||
spec:
|
||||
secretName: {{ . }}-restapi-tls
|
||||
isCA: false
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
dnsNames:
|
||||
- "{{ . }}"
|
||||
- "{{ . }}.{{ $root.Release.Namespace }}.svc"
|
||||
- "{{ . }}.{{ $root.Release.Namespace }}.svc.{{ $root.Values.restapiCerts.clusterDomain }}"
|
||||
issuerRef:
|
||||
name: ow-ca-issuer
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -30,6 +30,10 @@ spec:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
initContainers:
|
||||
- name: delay
|
||||
image: "alpine:latest"
|
||||
command: ["/bin/sleep","{{ default 0 .Values.clustersysteminfo.delay }}"]
|
||||
containers:
|
||||
- name: clustersysteminfo-check
|
||||
image: "{{ .Values.clustersysteminfo.images.clustersysteminfo.repository }}:{{ .Values.clustersysteminfo.images.clustersysteminfo.tag }}"
|
||||
|
||||
@@ -66,8 +66,7 @@ kafka:
|
||||
# clustersysteminfo check
|
||||
clustersysteminfo:
|
||||
enabled: false
|
||||
|
||||
fullnameOverride: clustersysteminfo
|
||||
delay: 0 # number of seconds to delay clustersysteminfo execution
|
||||
|
||||
images:
|
||||
clustersysteminfo:
|
||||
@@ -99,7 +98,7 @@ clustersysteminfo:
|
||||
|
||||
public_env_variables:
|
||||
FLAGS: "-s --connect-timeout 3"
|
||||
OWSEC: sec:16001
|
||||
OWSEC: owsec-owsec:16001
|
||||
CHECK_RETRIES: 30
|
||||
|
||||
secret_env_variables:
|
||||
@@ -111,3 +110,271 @@ clustersysteminfo:
|
||||
backoffLimit: 5
|
||||
restartPolicy: OnFailure
|
||||
|
||||
# OpenWIFI Load Simulator (https://github.com/Telecominfraproject/wlan-cloud-owls)
|
||||
owls:
|
||||
enabled: false
|
||||
|
||||
fullnameOverride: owls
|
||||
|
||||
configProperties:
|
||||
openwifi.kafka.enable: "true"
|
||||
openwifi.kafka.brokerlist: kafka:9092
|
||||
|
||||
# OpenWIFI Load Simulator UI (https://github.com/Telecominfraproject/wlan-cloud-owls-ui)
|
||||
owlsui:
|
||||
enabled: false
|
||||
|
||||
fullnameOverride: owlsui
|
||||
|
||||
# HAproxy (https://github.com/bitnami/charts/tree/master/bitnami/haproxy)
|
||||
haproxy:
|
||||
enabled: true
|
||||
|
||||
fullnameOverride: proxy
|
||||
|
||||
replicaCount: 3
|
||||
|
||||
service:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
# healthcheck
|
||||
- name: health
|
||||
protocol: TCP
|
||||
port: 8080
|
||||
targetPort: health
|
||||
# owfms
|
||||
- name: owfmsrest
|
||||
protocol: TCP
|
||||
port: 16004
|
||||
targetPort: owfmsrest
|
||||
- name: owfmsrestint
|
||||
protocol: TCP
|
||||
port: 17004
|
||||
targetPort: owfmsrestint
|
||||
# owgw
|
||||
- name: owgwws
|
||||
protocol: TCP
|
||||
port: 15002
|
||||
targetPort: owgwws
|
||||
- name: owgwrest
|
||||
protocol: TCP
|
||||
port: 16002
|
||||
targetPort: owgwrest
|
||||
- name: owgwfileup
|
||||
protocol: TCP
|
||||
port: 16003
|
||||
targetPort: owgwfileup
|
||||
- name: owgwrestint
|
||||
protocol: TCP
|
||||
port: 17002
|
||||
targetPort: owgwrestint
|
||||
# owprov
|
||||
- name: owprovrest
|
||||
protocol: TCP
|
||||
port: 16005
|
||||
targetPort: owprovrest
|
||||
- name: owprovrestint
|
||||
protocol: TCP
|
||||
port: 17005
|
||||
targetPort: owprovrestint
|
||||
# owsec
|
||||
- name: owsecrest
|
||||
protocol: TCP
|
||||
port: 16001
|
||||
targetPort: owsecrest
|
||||
- name: owsecrestint
|
||||
protocol: TCP
|
||||
port: 17001
|
||||
targetPort: owsecrestint
|
||||
# rttys
|
||||
- name: rttysdev
|
||||
protocol: TCP
|
||||
port: 5912
|
||||
targetPort: rttysdev
|
||||
- name: rttysuser
|
||||
protocol: TCP
|
||||
port: 5913
|
||||
targetPort: rttysuser
|
||||
- name: rttysweb
|
||||
protocol: TCP
|
||||
port: 5914
|
||||
targetPort: rttysweb
|
||||
|
||||
containerPorts:
|
||||
# healthcheck
|
||||
- name: health
|
||||
containerPort: 8080
|
||||
# owfms
|
||||
- name: owfmsrest
|
||||
containerPort: 16004
|
||||
- name: owfmsrestint
|
||||
containerPort: 17004
|
||||
# owgw
|
||||
- name: owgwws
|
||||
containerPort: 15002
|
||||
- name: owgwrest
|
||||
containerPort: 16002
|
||||
- name: owgwfileup
|
||||
containerPort: 16003
|
||||
- name: owgwrestint
|
||||
containerPort: 17002
|
||||
# owprov
|
||||
- name: owprovrest
|
||||
containerPort: 16005
|
||||
- name: owprovrestint
|
||||
containerPort: 17005
|
||||
# owsec
|
||||
- name: owsecrest
|
||||
containerPort: 16001
|
||||
- name: owsecrestint
|
||||
containerPort: 17001
|
||||
# rttys
|
||||
- name: rttysdev
|
||||
containerPort: 5912
|
||||
- name: rttysuser
|
||||
containerPort: 5913
|
||||
- name: rttysweb
|
||||
containerPort: 5914
|
||||
|
||||
configuration: |
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 1024
|
||||
defaults
|
||||
log global
|
||||
timeout client 360s
|
||||
timeout connect 60s
|
||||
timeout server 360s
|
||||
|
||||
# healthcheck
|
||||
frontend front_healthcheck
|
||||
bind :8080
|
||||
mode http
|
||||
default_backend back_healthcheck
|
||||
backend back_healthcheck
|
||||
mode http
|
||||
http-after-response set-header Access-Control-Allow-Origin "*"
|
||||
http-after-response set-header Access-Control-Max-Age "31536000"
|
||||
http-request return status 200 content-type "text/plain" string "Pong"
|
||||
|
||||
# owfms
|
||||
frontend front_owfms_rest
|
||||
bind :16004
|
||||
mode tcp
|
||||
default_backend back_owfms_rest
|
||||
backend back_owfms_rest
|
||||
mode tcp
|
||||
server svc_owfms_rest owfms-owfms:16004
|
||||
|
||||
frontend front_owfms_rest_internal
|
||||
bind :17004
|
||||
mode tcp
|
||||
default_backend back_owfms_rest_internal
|
||||
backend back_owfms_rest_internal
|
||||
mode tcp
|
||||
server svc_owfms_rest_internal owfms-owfms:17004
|
||||
|
||||
# owgw
|
||||
frontend front_owgw_websocket
|
||||
bind :15002
|
||||
mode tcp
|
||||
default_backend back_owgw_websocket
|
||||
backend back_owgw_websocket
|
||||
mode tcp
|
||||
server svc_owgw_websocket owgw-owgw:15002
|
||||
|
||||
frontend front_owgw_rest
|
||||
bind :16002
|
||||
mode tcp
|
||||
default_backend back_owgw_rest
|
||||
backend back_owgw_rest
|
||||
mode tcp
|
||||
server svc_owgw_rest owgw-owgw:16002
|
||||
|
||||
frontend front_owgw_fileuploader
|
||||
bind :16003
|
||||
mode tcp
|
||||
default_backend back_owgw_fileuploader
|
||||
backend back_owgw_fileuploader
|
||||
mode tcp
|
||||
server svc_owgw_fileuploader owgw-owgw:16003
|
||||
|
||||
frontend front_owgw_rest_internal
|
||||
bind :17002
|
||||
mode tcp
|
||||
default_backend back_owgw_rest_internal
|
||||
backend back_owgw_rest_internal
|
||||
mode tcp
|
||||
server svc_owgw_rest_internal owgw-owgw:17002
|
||||
|
||||
# owprov
|
||||
frontend front_owprov_rest
|
||||
bind :16005
|
||||
mode tcp
|
||||
default_backend back_owprov_rest
|
||||
backend back_owprov_rest
|
||||
mode tcp
|
||||
server svc_owprov_rest owprov-owprov:16005
|
||||
|
||||
frontend front_owprov_rest_internal
|
||||
bind :17005
|
||||
mode tcp
|
||||
default_backend back_owprov_rest_internal
|
||||
backend back_owprov_rest_internal
|
||||
mode tcp
|
||||
server svc_owprov_rest_internal owprov-owprov:17005
|
||||
|
||||
# owsec
|
||||
frontend front_owsec_rest
|
||||
bind :16001
|
||||
mode tcp
|
||||
default_backend back_owsec_rest
|
||||
backend back_owsec_rest
|
||||
mode tcp
|
||||
server svc_owsec_rest owsec-owsec:16001
|
||||
|
||||
frontend front_owsec_rest_internal
|
||||
bind :17001
|
||||
mode tcp
|
||||
default_backend back_owsec_rest_internal
|
||||
backend back_owsec_rest_internal
|
||||
mode tcp
|
||||
server svc_owsec_rest_internal owsec-owsec:17001
|
||||
|
||||
# rttys
|
||||
frontend front_rttys_dev
|
||||
bind :5912
|
||||
mode tcp
|
||||
default_backend back_rttys_dev
|
||||
backend back_rttys_dev
|
||||
mode tcp
|
||||
server svc_rttys_dev rttys-rttys:5912
|
||||
|
||||
frontend front_rttys_user
|
||||
bind :5913
|
||||
mode tcp
|
||||
default_backend back_rttys_user
|
||||
backend back_rttys_user
|
||||
mode tcp
|
||||
server svc_rttys_user rttys-rttys:5913
|
||||
|
||||
frontend front_rttys_web
|
||||
bind :5914
|
||||
mode tcp
|
||||
default_backend back_rttys_web
|
||||
backend back_rttys_web
|
||||
mode tcp
|
||||
server svc_rttys_web rttys-rttys:5914
|
||||
|
||||
# Cert-manager RESTAPI certs
|
||||
restapiCerts:
|
||||
enabled: false
|
||||
|
||||
services:
|
||||
- owgw-owgw
|
||||
- owsec-owsec
|
||||
- owfms-owfms
|
||||
- owprov-owprov
|
||||
- owls-owls
|
||||
|
||||
clusterDomain: cluster.local
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
# Image tags
|
||||
COMPOSE_PROJECT_NAME=openwifi
|
||||
OWGW_TAG=master
|
||||
OWGWUI_TAG=main
|
||||
OWSEC_TAG=main
|
||||
OWFMS_TAG=main
|
||||
OWPROV_TAG=main
|
||||
OWPROVUI_TAG=main
|
||||
OWGW_TAG=v2.5.0-RC1
|
||||
OWGWUI_TAG=v2.5.0-RC1
|
||||
OWSEC_TAG=v2.5.0-RC1
|
||||
OWFMS_TAG=v2.5.0-RC1
|
||||
OWPROV_TAG=v2.5.0-RC1
|
||||
OWPROVUI_TAG=v2.5.0-RC1
|
||||
RTTYS_TAG=3.5.0
|
||||
KAFKA_TAG=latest
|
||||
ZOOKEEPER_TAG=latest
|
||||
ACMESH_TAG=latest
|
||||
TRAEFIK_TAG=latest
|
||||
POSTGRESQL_TAG=latest
|
||||
|
||||
# Microservice root/config directories
|
||||
OWGW_ROOT=/owgw-data
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Image tags
|
||||
COMPOSE_PROJECT_NAME=openwifi
|
||||
OWGW_TAG=master
|
||||
OWGWUI_TAG=main
|
||||
OWSEC_TAG=main
|
||||
OWFMS_TAG=main
|
||||
OWPROV_TAG=main
|
||||
OWPROVUI_TAG=main
|
||||
OWGW_TAG=v2.5.0-RC1
|
||||
OWGWUI_TAG=v2.5.0-RC1
|
||||
OWSEC_TAG=v2.5.0-RC1
|
||||
OWFMS_TAG=v2.5.0-RC1
|
||||
OWPROV_TAG=v2.5.0-RC1
|
||||
OWPROVUI_TAG=v2.5.0-RC1
|
||||
RTTYS_TAG=3.5.0
|
||||
KAFKA_TAG=latest
|
||||
ZOOKEEPER_TAG=latest
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Image tags
|
||||
COMPOSE_PROJECT_NAME=openwifi
|
||||
OWGW_TAG=master
|
||||
OWGWUI_TAG=main
|
||||
OWSEC_TAG=main
|
||||
OWFMS_TAG=main
|
||||
OWPROV_TAG=main
|
||||
OWPROVUI_TAG=main
|
||||
OWGW_TAG=v2.5.0-RC1
|
||||
OWGWUI_TAG=v2.5.0-RC1
|
||||
OWSEC_TAG=v2.5.0-RC1
|
||||
OWFMS_TAG=v2.5.0-RC1
|
||||
OWPROV_TAG=v2.5.0-RC1
|
||||
OWPROVUI_TAG=v2.5.0-RC1
|
||||
RTTYS_TAG=3.5.0
|
||||
KAFKA_TAG=latest
|
||||
ZOOKEEPER_TAG=latest
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
# Docker Compose
|
||||
# OpenWifi SDK Docker Compose
|
||||
### Overview
|
||||
With the provided Docker Compose files you can instantiate a deployment of the OpenWifi microservices and related components. The repository contains a self-signed certificate and a TIP-signed gateway certificate which are valid for the `*.wlan.local` domain. You also have the possibility to either generate and use Letsencrypt certs or provide your own certificates. Furthermore the deployments are split by whether Traefik is used as a reverse proxy/load balancer in front of the microservices or if they are exposed directly on the host. The advantage of using the deployments with Traefik is that you can use Letsencrypt certs (automatic certificate generation and renewal) and you have the ability to scale specific containers to multiple replicas.
|
||||
With the provided Docker Compose files you can instantiate a deployment of the OpenWifi microservices and related components. The repository contains a self-signed certificate and a TIP-signed gateway certificate which are valid for the `*.wlan.local` domain. You also have the possibility to either generate and use Letsencrypt certs or provide your own certificates. Furthermore the deployments are split by whether Traefik is used as a reverse proxy/load balancer in front of the microservices or if they are exposed directly on the host. The advantage of using the deployments with Traefik is that you can use Letsencrypt certs (automatic certificate generation and renewal) and you have the ability to scale specific containers to multiple replicas.
|
||||
The repository also contains a separate Docker Compose deployment to set up the [OWLS microservice](https://github.com/Telecominfraproject/wlan-cloud-owls) and related components for running a load simulation test against an existing controller.
|
||||
- [Non-LB deployment with self-signed certificates](#non-lb-deployment-with-self-signed-certificates)
|
||||
- [Non-LB deployment with own certificates](#non-lb-deployment-with-own-certificates)
|
||||
- [Non-LB deployment with PostgreSQL](#non-lb-deployment-with-postgresql)
|
||||
- [LB deployment with self-signed certificates](#lb-deployment-with-self-signed-certificates)
|
||||
- [LB deployment with Letsencrypt certificates](#lb-deployment-with-letsencrypt-certificates)
|
||||
- [OWLS deployment with self-signed certificates](owls/README.md)
|
||||
### Configuration
|
||||
The configuration of the OpenWifi microservices is done via environment variables. For an overview of the supported configuration properties have a look into the microservice specific env files. For an explanation of the configuration properties please see the README in the respective microservice repository.
|
||||
If you don't bind mount your own config files they are generated on every startup based on the environment variables in the microservice specific env files. For an overview of the supported configuration properties have a look into the microservice specific env files. For an explanation of the configuration properties please see the README in the respective microservice repository.
|
||||
Be aware that the non-LB deployment exposes the generated config files on the host. So if you want to make configuration changes afterwards, please do them directly in the config files located in the microservice data directories.
|
||||
#### Required password changing on the first startup
|
||||
One important action that must be done before using the deployment is changing password for the default user in owsec as described in [owsec docs](https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/tree/main#changing-default-password). Please use these docs to find the actions that must be done **after** the deployment in order to start using your deployment.
|
||||
### Ports
|
||||
Every OpenWifi service is exposed via a separate port either directly on the host or through Traefik. For an overview of the exposed ports have a look into the deployment specific Docker Compose file. If you use your own certificates or make use of the [Letsencrypt LB deployment](#lb-deployment-with-letsencrypt-certificates), you can also configure different hostnames for the microservices.
|
||||
Please note that the OWProv-UI is exposed on port `8080(HTTP)/8443(HTTPS)` by default except for the Letsencrypt LB deployment, where the service listens on the default `80/443` HTTP(S) ports.
|
||||
### owsec templates and wwwassets
|
||||
On the startup of owsec directories for wwwassets and mailer templates are created from the base files included in Docker image. After the initial startup you may edit those files as you wish in the [owsec-data/persist](./owsec-data/persist) directory.
|
||||
## Non-LB deployment with self-signed certificates
|
||||
1. Switch into the project directory with `cd docker-compose/`.
|
||||
2. Add an entry for `openwifi.wlan.local` in your hosts file which points to `127.0.0.1` or whatever the IP of the host running the deployment is.
|
||||
@@ -16,10 +25,10 @@ One important action that must be done before using the deployment is changing p
|
||||
4. Check if the containers are up and running with `docker-compose ps`.
|
||||
5. Add SSL certificate exceptions in your browser by visiting https://openwifi.wlan.local:16001, https://openwifi.wlan.local:16002, https://openwifi.wlan.local:16004 and https://openwifi.wlan.local:16005.
|
||||
6. Connect to your AP via SSH and add a static hosts entry in `/etc/hosts` for `openwifi.wlan.local`. This should point to the address of the host the Compose deployment runs on.
|
||||
7. Navigate to the UI `https://openwifi.wlan.local` and login with your OWSec authentication data.
|
||||
7. Login to the UI `https://openwifi.wlan.local` and follow the instructions to change your default password.
|
||||
8. To use the curl test scripts included in the microservice repositories set the following environment variables:
|
||||
```
|
||||
export UCENTRALSEC="openwifi.wlan.local:16001"
|
||||
export OWSEC="openwifi.wlan.local:16001"
|
||||
export FLAGS="-s --cacert <your-wlan-cloud-ucentral-deploy-location>/docker-compose/certs/restapi-ca.pem"
|
||||
```
|
||||
⚠️**Note**: When deploying with self-signed certificates you can not make use of the trace functionality in the UI since the AP will throw a TLS error when uploading the trace to OWGW. Please use the Letsencrypt deployment or provide your own valid certificates if you want to use this function.
|
||||
@@ -66,7 +75,60 @@ export FLAGS="-s --cacert <your-wlan-cloud-ucentral-deploy-location>/docker-comp
|
||||
| `DEFAULT_UCENTRALSEC_URL` | Set this to your OWSec URL, for example `https://owsec.example.com:16001`. |
|
||||
3. Spin up the deployment with `docker-compose up -d`.
|
||||
4. Check if the containers are up and running with `docker-compose ps`.
|
||||
5. Navigate to the UI and login with your OWSec authentication data.
|
||||
5. Login to the UI and and follow the instructions to change your default password.
|
||||
## Non-LB deployment with PostgreSQL
|
||||
1. Switch into the project directory with `cd docker-compose/`.
|
||||
2. Set the following variables in the env files and make sure to uncomment the lines. It is highly recommended that you change the DB passwords to some random string.
|
||||
### owgw.env
|
||||
| Variable | Value/Description |
|
||||
| ---------------------------------- | ----------------- |
|
||||
| `STORAGE_TYPE` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_HOST` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_USERNAME` | `owgw` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_PASSWORD` | `owgw` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_DATABASE` | `owgw` |
|
||||
### owsec.env
|
||||
| Variable | Value/Description |
|
||||
| ---------------------------------- | ----------------- |
|
||||
| `STORAGE_TYPE` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_HOST` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_USERNAME` | `owsec` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_PASSWORD` | `owsec` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_DATABASE` | `owsec` |
|
||||
### owfms.env
|
||||
| Variable | Value/Description |
|
||||
| ---------------------------------- | ----------------- |
|
||||
| `STORAGE_TYPE` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_HOST` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_USERNAME` | `owfms` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_PASSWORD` | `owfms` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_DATABASE` | `owfms` |
|
||||
### owprov.env
|
||||
| Variable | Value/Description |
|
||||
| ---------------------------------- | ----------------- |
|
||||
| `STORAGE_TYPE` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_HOST` | `postgresql` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_USERNAME` | `owprov` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_PASSWORD` | `owprov` |
|
||||
| `STORAGE_TYPE_POSTGRESQL_DATABASE` | `owprov` |
|
||||
### postgresql.env
|
||||
| Variable | Value |
|
||||
| -------------------- | ---------- |
|
||||
| `POSTGRES_PASSWORD` | `postgres` |
|
||||
| `POSTGRES_USER` | `postgres` |
|
||||
| `OWGW_DB` | `owgw` |
|
||||
| `OWGW_DB_USER` | `owgw` |
|
||||
| `OWGW_DB_PASSWORD` | `owgw` |
|
||||
| `OWSEC_DB` | `owsec` |
|
||||
| `OWSEC_DB_USER` | `owsec` |
|
||||
| `OWSEC_DB_PASSWORD` | `owsec` |
|
||||
| `OWFMS_DB` | `owfms` |
|
||||
| `OWFMS_DB_USER` | `owfms` |
|
||||
| `OWFMS_DB_PASSWORD` | `owfms` |
|
||||
| `OWPROV_DB` | `owprov` |
|
||||
| `OWPROV_DB_USER` | `owprov` |
|
||||
| `OWPROV_DB_PASSWORD` | `owprov` |
|
||||
3. Depending on whether you want to use [self-signed certificates](#non-lb-deployment-with-self-signed-certificates) or [provide your own](#non-lb-deployment-with-own-certificates), follow the instructions of the according deployment model. Spin up the deployment with `docker-compose -f docker-compose.yml -f docker-compose.postgresql.yml up -d`. It is recommended to create an alias for this deployment model with `alias docker-compose-postgresql="docker-compose -f docker-compose.yml -f docker-compose.postgresql.yml"`.
|
||||
## LB deployment with self-signed certificates
|
||||
Follow the same instructions as for the self-signed deployment without Traefik. The only difference is that you have to spin up the deployment with `docker-compose -f docker-compose.lb.selfsigned.yml --env-file .env.selfsigned up -d`. Make sure to specify the Compose and the according .env file every time you're working with the deployment or create an alias, for example `alias docker-compose-lb-selfsigned="docker-compose -f docker-compose.lb.selfsigned.yml --env-file .env.selfsigned"`. You also have the possibility to scale specific services to a specified number of instances with `docker-compose-lb-selfsigned up -d --scale SERVICE=NUM`, where `SERVICE` is the service name as defined in the Compose file.
|
||||
## LB deployment with Letsencrypt certificates
|
||||
@@ -125,8 +187,6 @@ For the Letsencrypt challenge to work you need a public IP address. The hostname
|
||||
| `TRAEFIK_CERTIFICATESRESOLVERS_OPENWIFI_ACME_EMAIL` | Email address used for ACME registration. |
|
||||
3. Spin up the deployment with `docker-compose -f docker-compose.lb.letsencrypt.yml --env-file .env.letsencrypt up -d`. Make sure to specify the Compose and the according .env file every time you're working with the deployment or create an alias, for example `alias docker-compose-lb-letsencrypt="docker-compose -f docker-compose.lb.letsencrypt.yml --env-file .env.letsencrypt"`. You also have the possibility to scale specific services to a specified number of instances with `docker-compose-lb-letsencrypt up -d --scale SERVICE=NUM`, where `SERVICE` is the service name as defined in the Compose file.
|
||||
4. Check if the containers are up and running with `docker-compose-lb-letsencrypt ps`.
|
||||
5. Navigate to the UI and login with your OWSec authentication data.
|
||||
5. Login to the UI and follow the instructions to change your default password.
|
||||
|
||||
**Note**: The deployments create local volumes to persist mostly application, database and certificate data. In addition to that the `certs/` directory is bind mounted into the microservice containers. Be aware that for the bind mounts the host directories and files will be owned by the user in the container. Since the files are under version control, you may have to change the ownership to your user again before pulling changes.
|
||||
### owsec templates and wwwassets
|
||||
On the startup of owsec directories for wwwassets and mailer templates are created from the base files included in Docker image. After the initial startup you may edit those files as you wish in the [owsec-data/persist](./owsec-data/persist) directory.
|
||||
**Note**: All deployments create local volumes to persist mostly application, database and certificate data. In addition to that the `certs/` directory is bind mounted into the microservice containers. Be aware that for the bind mounts the host directories and files will be owned by the user in the container. Since the files are under version control, you may have to change the ownership to your user again before pulling changes.
|
||||
|
||||
37
docker-compose/docker-compose.postgresql.yml
Normal file
37
docker-compose/docker-compose.postgresql.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
postgresql_data:
|
||||
driver: local
|
||||
|
||||
services:
|
||||
owgw:
|
||||
depends_on:
|
||||
- postgresql
|
||||
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owgw"]
|
||||
|
||||
owsec:
|
||||
depends_on:
|
||||
- postgresql
|
||||
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owsec"]
|
||||
|
||||
owfms:
|
||||
depends_on:
|
||||
- postgresql
|
||||
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owfms"]
|
||||
|
||||
owprov:
|
||||
depends_on:
|
||||
- postgresql
|
||||
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owprov"]
|
||||
|
||||
postgresql:
|
||||
image: "postgres:${POSTGRESQL_TAG}"
|
||||
networks:
|
||||
openwifi:
|
||||
env_file:
|
||||
- postgresql.env
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgresql_data:/var/lib/postgresql/data
|
||||
- ./postgresql/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
|
||||
@@ -2,6 +2,9 @@ RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWFMS_ROOT=/owfms-data
|
||||
OWFMS_CONFIG=/owfms-data
|
||||
|
||||
#RESTAPI_HOST_ROOTCA=$OWFMS_ROOT/certs/restapi-ca.pem
|
||||
#RESTAPI_HOST_PORT=16004
|
||||
#RESTAPI_HOST_CERT=$OWFMS_ROOT/certs/restapi-cert.pem
|
||||
|
||||
@@ -2,6 +2,9 @@ RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWGW_ROOT=/owgw-data
|
||||
OWGW_CONFIG=/owgw-data
|
||||
|
||||
#WEBSOCKET_HOST_ROOTCA=$OWGW_ROOT/certs/root.pem
|
||||
#WEBSOCKET_HOST_ISSUER=$OWGW_ROOT/certs/issuer.pem
|
||||
#WEBSOCKET_HOST_CERT=$OWGW_ROOT/certs/websocket-cert.pem
|
||||
@@ -34,6 +37,7 @@ SYSTEM_DATA=$OWGW_ROOT/persist
|
||||
SYSTEM_URI_PRIVATE=https://owgw.wlan.local:17002
|
||||
SYSTEM_URI_PUBLIC=https://openwifi.wlan.local:16002
|
||||
SYSTEM_URI_UI=https://openwifi.wlan.local
|
||||
#SIMULATORID=
|
||||
RTTY_ENABLED=true
|
||||
RTTY_SERVER=openwifi.wlan.local
|
||||
#RTTY_PORT=5912
|
||||
|
||||
17
docker-compose/owls/.env
Normal file
17
docker-compose/owls/.env
Normal file
@@ -0,0 +1,17 @@
|
||||
# Image tags
|
||||
COMPOSE_PROJECT_NAME=owls
|
||||
OWSEC_TAG=main
|
||||
OWLS_TAG=main
|
||||
OWLSUI_TAG=master
|
||||
KAFKA_TAG=latest
|
||||
ZOOKEEPER_TAG=latest
|
||||
|
||||
# Microservice root/config directories
|
||||
OWSEC_ROOT=/owsec-data
|
||||
OWSEC_CONFIG=/owsec-data
|
||||
OWLS_ROOT=/owls-data
|
||||
OWLS_CONFIG=/owls-data
|
||||
|
||||
# Microservice hostnames
|
||||
INTERNAL_OWSEC_HOSTNAME=owsec.wlan.local
|
||||
INTERNAL_OWLS_HOSTNAME=owls.wlan.local
|
||||
16
docker-compose/owls/README.md
Normal file
16
docker-compose/owls/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# OpenWifi OWLS Docker Compose
|
||||
## Deployment with self-signed certificates
|
||||
To run a load simulation you need to generate a specific Digicert-signed AP certificate which will be used to connect to the gateway. The certificate serial number has to start with the digits `53494d` since otherwise the gateway won't allow a load simulation. The rest of the serial number and the specified redirector URL can be chosen randomly. You only need to generate one AP certificate for your simulations.
|
||||
Be aware that since the OWLS deployment partly exposes the same ports on the host as the OpenWifi deployment, it is not intended that both run on the same host.
|
||||
1. Copy or move your AP load simulation certificate into the `docker-compose/certs` directory. Don't forget to name the files `device-cert.pem` and `device-key.pem` or adapt the path names in the OWLS configuration if you're using different file names.
|
||||
2. To be able to run load simulation tests against your OpenWifi SDK deployment, you'll have to [add the serial number of your generated AP certificate to the gateway configuration](https://github.com/Telecominfraproject/wlan-cloud-owls#prepare-your-openwifi-gateway). You can do that by either editing [owgw.env](../owgw.env) or doing the changes directly in your OWGW configuration file if it is exposed on your Docker host.
|
||||
3. Switch into the project directory with `cd docker-compose/owls`.
|
||||
4. Add an entry for `openwifi-owls.wlan.local` in your hosts file which points to `127.0.0.1` or whatever the IP of the host running the OWLS deployment is.
|
||||
5. Spin up the deployment with `docker-compose up -d`.
|
||||
6. Check if the containers are up and running with `docker-compose ps`.
|
||||
7. Add SSL certificate exceptions in your browser by visiting https://openwifi-owls.wlan.local:16001 and https://openwifi-owls.wlan.local:16007.
|
||||
8. If you're using an OpenWifi deployment with self-signed certificates, you'll have to add a custom hosts entry for `openwifi.wlan.local` on the machine running the OWLS deployment pointing to the remote IP of your OpenWifi host.
|
||||
9. Login to the UI by visiting https://openwifi-owls.wlan.local and follow the instructions to change your default password.
|
||||
10. In the Simulation tab, click on the + sign on the right side to add a load simulation.
|
||||
11. Fill out the required fields. MAC prefix is used for the MAC addresses of the simulated devices, so you can use any six-digit hexadecimal number. Specify the remote address of your OpenWifi gateway in the Gateway field, for example `https://openwifi.wlan.local:15002`. Adapt the rest of the settings according to your needs.
|
||||
12. Click on the floppy disk icon to save your load simulation. You can run it by clicking the play symbol in the table view.
|
||||
89
docker-compose/owls/docker-compose.yml
Normal file
89
docker-compose/owls/docker-compose.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
zookeeper_data:
|
||||
driver: local
|
||||
zookeeper_datalog:
|
||||
driver: local
|
||||
kafka_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
owls:
|
||||
|
||||
services:
|
||||
owsec:
|
||||
image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owsec:${OWSEC_TAG}"
|
||||
networks:
|
||||
owls:
|
||||
aliases:
|
||||
- ${INTERNAL_OWSEC_HOSTNAME}
|
||||
env_file:
|
||||
- owsec.env
|
||||
depends_on:
|
||||
- kafka
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "./owsec_data:${OWSEC_ROOT}"
|
||||
- "../certs:/${OWSEC_ROOT}/certs"
|
||||
ports:
|
||||
- "16001:16001"
|
||||
- "16101:16101"
|
||||
|
||||
owls:
|
||||
image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owls:${OWLS_TAG}"
|
||||
networks:
|
||||
owls:
|
||||
aliases:
|
||||
- ${INTERNAL_OWLS_HOSTNAME}
|
||||
env_file:
|
||||
- owls.env
|
||||
depends_on:
|
||||
- owsec
|
||||
- kafka
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "./owls_data:${OWLS_ROOT}"
|
||||
- "../certs:/${OWLS_ROOT}/certs"
|
||||
ports:
|
||||
- "16007:16007"
|
||||
- "16107:16107"
|
||||
|
||||
owls-ui:
|
||||
image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owls-ui:${OWLSUI_TAG}"
|
||||
networks:
|
||||
owls:
|
||||
env_file:
|
||||
- owls-ui.env
|
||||
depends_on:
|
||||
- owsec
|
||||
- owls
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "./owls-ui/default.conf:/etc/nginx/conf.d/default.conf"
|
||||
- "../certs/restapi-cert.pem:/etc/nginx/restapi-cert.pem"
|
||||
- "../certs/restapi-key.pem:/etc/nginx/restapi-key.pem"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
||||
zookeeper:
|
||||
image: "zookeeper:${ZOOKEEPER_TAG}"
|
||||
networks:
|
||||
owls:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- zookeeper_data:/data
|
||||
- zookeeper_datalog:/datalog
|
||||
|
||||
kafka:
|
||||
image: "docker.io/bitnami/kafka:${KAFKA_TAG}"
|
||||
networks:
|
||||
owls:
|
||||
env_file:
|
||||
- kafka.env
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- zookeeper
|
||||
volumes:
|
||||
- kafka_data:/bitnami/kafka
|
||||
2
docker-compose/owls/kafka.env
Normal file
2
docker-compose/owls/kafka.env
Normal file
@@ -0,0 +1,2 @@
|
||||
KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
|
||||
ALLOW_PLAINTEXT_LISTENER=yes
|
||||
2
docker-compose/owls/owls-ui.env
Normal file
2
docker-compose/owls/owls-ui.env
Normal file
@@ -0,0 +1,2 @@
|
||||
DEFAULT_UCENTRALSEC_URL=https://openwifi-owls.wlan.local:16001
|
||||
ALLOW_UCENTRALSEC_CHANGE=false
|
||||
32
docker-compose/owls/owls-ui/default.conf
Normal file
32
docker-compose/owls/owls-ui/default.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# Disable emitting nginx version
|
||||
server_tokens off;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
# Disable emitting nginx version
|
||||
server_tokens off;
|
||||
|
||||
ssl_certificate /etc/nginx/restapi-cert.pem;
|
||||
ssl_certificate_key /etc/nginx/restapi-key.pem;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
43
docker-compose/owls/owls.env
Normal file
43
docker-compose/owls/owls.env
Normal file
@@ -0,0 +1,43 @@
|
||||
RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWLS_ROOT=/owls-data
|
||||
OWLS_CONFIG=/owls-data
|
||||
|
||||
#ROOTCA=$OWLS_ROOT/certs/root.pem
|
||||
#ISSUER=$OWLS_ROOT/certs/issuer.pem
|
||||
#CERT=$OWLS_ROOT/certs/device-cert.pem
|
||||
#KEY=$OWLS_ROOT/certs/device-key.pem
|
||||
#CLIENTCAS=$OWLS_ROOT/certs/clientcas.pem
|
||||
#CAS=$OWLS_ROOT/certs/cas
|
||||
#KEY_PASSWORD=mypassword
|
||||
#RESTAPI_HOST_ROOTCA=$OWLS_ROOT/certs/restapi-ca.pem
|
||||
#RESTAPI_HOST_PORT=16007
|
||||
#RESTAPI_HOST_CERT=$OWLS_ROOT/certs/restapi-cert.pem
|
||||
#RESTAPI_HOST_KEY=$OWLS_ROOT/certs/restapi-key.pem
|
||||
#RESTAPI_HOST_KEY_PASSWORD=mypassword
|
||||
#INTERNAL_RESTAPI_HOST_ROOTCA=$OWLS_ROOT/certs/restapi-ca.pem
|
||||
#INTERNAL_RESTAPI_HOST_PORT=17007
|
||||
#INTERNAL_RESTAPI_HOST_CERT=$OWLS_ROOT/certs/restapi-cert.pem
|
||||
#INTERNAL_RESTAPI_HOST_KEY=$OWLS_ROOT/certs/restapi-key.pem
|
||||
#INTERNAL_RESTAPI_HOST_KEY_PASSWORD=mypassword
|
||||
#SERVICE_KEY=$OWLS_ROOT/certs/restapi-key.pem
|
||||
#SERVICE_KEY_PASSWORD=mypassword
|
||||
SYSTEM_DATA=$OWLS_ROOT/persist
|
||||
SYSTEM_URI_PRIVATE=https://owls.wlan.local:17007
|
||||
SYSTEM_URI_PUBLIC=https://openwifi-owls.wlan.local:16007
|
||||
SYSTEM_URI_UI=https://openwifi-owls.wlan.local
|
||||
#KAFKA_ENABLE=true
|
||||
KAFKA_BROKERLIST=kafka:9092
|
||||
#STORAGE_TYPE=sqlite
|
||||
#STORAGE_TYPE_POSTGRESQL_HOST=localhost
|
||||
#STORAGE_TYPE_POSTGRESQL_USERNAME=owls
|
||||
#STORAGE_TYPE_POSTGRESQL_PASSWORD=owls
|
||||
#STORAGE_TYPE_POSTGRESQL_DATABASE=owls
|
||||
#STORAGE_TYPE_POSTGRESQL_PORT=5432
|
||||
#STORAGE_TYPE_MYSQL_HOST=localhost
|
||||
#STORAGE_TYPE_MYSQL_USERNAME=owls
|
||||
#STORAGE_TYPE_MYSQL_PASSWORD=owls
|
||||
#STORAGE_TYPE_MYSQL_DATABASE=owls
|
||||
#STORAGE_TYPE_MYSQL_PORT=3306
|
||||
47
docker-compose/owls/owsec.env
Normal file
47
docker-compose/owls/owsec.env
Normal file
@@ -0,0 +1,47 @@
|
||||
RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWSEC_ROOT=/owsec-data
|
||||
OWSEC_CONFIG=/owsec-data
|
||||
|
||||
#RESTAPI_HOST_ROOTCA=$OWSEC_ROOT/certs/restapi-ca.pem
|
||||
#RESTAPI_HOST_PORT=16001
|
||||
#RESTAPI_HOST_CERT=$OWSEC_ROOT/certs/restapi-cert.pem
|
||||
#RESTAPI_HOST_KEY=$OWSEC_ROOT/certs/restapi-key.pem
|
||||
#RESTAPI_HOST_KEY_PASSWORD=mypassword
|
||||
#RESTAPI_WWWASSETS=$OWSEC_ROOT/wwwassets
|
||||
#INTERNAL_RESTAPI_HOST_ROOTCA=$OWSEC_ROOT/certs/restapi-ca.pem
|
||||
#INTERNAL_RESTAPI_HOST_PORT=17001
|
||||
#INTERNAL_RESTAPI_HOST_CERT=$OWSEC_ROOT/certs/restapi-cert.pem
|
||||
#INTERNAL_RESTAPI_HOST_KEY=$OWSEC_ROOT/certs/restapi-key.pem
|
||||
#INTERNAL_RESTAPI_HOST_KEY_PASSWORD=mypassword
|
||||
#AUTHENTICATION_DEFAULT_USERNAME=tip@ucentral.com
|
||||
#AUTHENTICATION_DEFAULT_PASSWORD=13268b7daa751240369d125e79c873bd8dd3bef7981bdfd38ea03dbb1fbe7dcf
|
||||
SYSTEM_DATA=$OWSEC_ROOT/persist
|
||||
SYSTEM_URI_PRIVATE=https://owsec.wlan.local:17001
|
||||
SYSTEM_URI_PUBLIC=https://openwifi-owls.wlan.local:16001
|
||||
SYSTEM_URI_UI=https://openwifi-owls.wlan.local
|
||||
#SERVICE_KEY=$OWSEC_ROOT/certs/restapi-key.pem
|
||||
#SERVICE_KEY_PASSWORD=mypassword
|
||||
#MAILER_HOSTNAME=localhost
|
||||
#MAILER_USERNAME=************************
|
||||
#MAILER_PASSWORD=************************
|
||||
#MAILER_SENDER=OpenWIFI
|
||||
#MAILER_PORT=587
|
||||
#MAILER_TEMPLATES=$OWSEC_ROOT/templates
|
||||
#KAFKA_ENABLE=true
|
||||
KAFKA_BROKERLIST=kafka:9092
|
||||
#DOCUMENT_POLICY_ACCESS=$OWSEC_ROOT/wwwassets/access_policy.html
|
||||
#DOCUMENT_POLICY_PASSWORD=$OWSEC_ROOT/wwwassets/password_policy.html
|
||||
#STORAGE_TYPE=sqlite
|
||||
#STORAGE_TYPE_POSTGRESQL_HOST=localhost
|
||||
#STORAGE_TYPE_POSTGRESQL_USERNAME=owsec
|
||||
#STORAGE_TYPE_POSTGRESQL_PASSWORD=owsec
|
||||
#STORAGE_TYPE_POSTGRESQL_DATABASE=owsec
|
||||
#STORAGE_TYPE_POSTGRESQL_PORT=5432
|
||||
#STORAGE_TYPE_MYSQL_HOST=localhost
|
||||
#STORAGE_TYPE_MYSQL_USERNAME=owsec
|
||||
#STORAGE_TYPE_MYSQL_PASSWORD=owsec
|
||||
#STORAGE_TYPE_MYSQL_DATABASE=owsec
|
||||
#STORAGE_TYPE_MYSQL_PORT=3306
|
||||
@@ -2,6 +2,9 @@ RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWPROV_ROOT=/owprov-data
|
||||
OWPROV_CONFIG=/owprov-data
|
||||
|
||||
#RESTAPI_HOST_ROOTCA=$OWPROV_ROOT/certs/restapi-ca.pem
|
||||
#RESTAPI_HOST_PORT=16005
|
||||
#RESTAPI_HOST_CERT=$OWPROV_ROOT/certs/restapi-cert.pem
|
||||
|
||||
@@ -2,6 +2,9 @@ RUN_CHOWN=true
|
||||
TEMPLATE_CONFIG=true
|
||||
SELFSIGNED_CERTS=true
|
||||
|
||||
OWSEC_ROOT=/owsec-data
|
||||
OWSEC_CONFIG=/owsec-data
|
||||
|
||||
#RESTAPI_HOST_ROOTCA=$OWSEC_ROOT/certs/restapi-ca.pem
|
||||
#RESTAPI_HOST_PORT=16001
|
||||
#RESTAPI_HOST_CERT=$OWSEC_ROOT/certs/restapi-cert.pem
|
||||
|
||||
14
docker-compose/postgresql.env
Normal file
14
docker-compose/postgresql.env
Normal file
@@ -0,0 +1,14 @@
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_USER=postgres
|
||||
OWGW_DB=owgw
|
||||
OWGW_DB_USER=owgw
|
||||
OWGW_DB_PASSWORD=owgw
|
||||
OWSEC_DB=owsec
|
||||
OWSEC_DB_USER=owsec
|
||||
OWSEC_DB_PASSWORD=owsec
|
||||
OWFMS_DB=owfms
|
||||
OWFMS_DB_USER=owfms
|
||||
OWFMS_DB_PASSWORD=owfms
|
||||
OWPROV_DB=owprov
|
||||
OWPROV_DB_USER=owprov
|
||||
OWPROV_DB_PASSWORD=owprov
|
||||
17
docker-compose/postgresql/init-db.sh
Executable file
17
docker-compose/postgresql/init-db.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
|
||||
CREATE USER $OWGW_DB_USER WITH ENCRYPTED PASSWORD '$OWGW_DB_PASSWORD';
|
||||
CREATE DATABASE $OWGW_DB;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $OWGW_DB TO $OWGW_DB_USER;
|
||||
CREATE USER $OWSEC_DB_USER WITH ENCRYPTED PASSWORD '$OWSEC_DB_PASSWORD';
|
||||
CREATE DATABASE $OWSEC_DB;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $OWSEC_DB TO $OWSEC_DB_USER;
|
||||
CREATE USER $OWFMS_DB_USER WITH ENCRYPTED PASSWORD '$OWFMS_DB_PASSWORD';
|
||||
CREATE DATABASE $OWFMS_DB;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $OWFMS_DB TO $OWFMS_DB_USER;
|
||||
CREATE USER $OWPROV_DB_USER WITH ENCRYPTED PASSWORD '$OWPROV_DB_PASSWORD';
|
||||
CREATE DATABASE $OWPROV_DB;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $OWPROV_DB TO $OWPROV_DB_USER;
|
||||
EOSQL
|
||||
Reference in New Issue
Block a user