moitt stands for Maistra OpenShift Istio Test Tool
A Testing Tool For Running Istio Doc Tasks on OpenShift
This project aims to automate installation and testing of Maistra Istio system on an AWS OpenShift Cluster.
The installation follows OpenShift Installer and Maistra istio-operator.
The testing follows Istio Doc Tasks.
OS Version: Fedora 28 or above
Go Version: go 1.11 or above
Note: If you clone this project inside of the $GOPATH/src
tree, invoke the go
command with GO111MODULE=on
environment variable set. https://github.com/golang/go/wiki/Modules#how-to-use-modules
Python Version: Python 3.7 or above
- Prepare aws configuration files or configure them from
awscli
- Install language runtime and tools. Run
scripts/setup.sh
- Save OpenShift Pull Secret content and we need to paste all the content in one line later
- Download your Istio private registry pull secret and create a file called "
secret.yaml
" - Confirm a shell has been started by pipenv. Otherwise, go to "
install
" directory and run "pipenv install; pipenv shell
"
Name | Description |
---|---|
AWS_PROFILE | AWS profile name |
PULL_SEC | Istio private registry pull secret.yaml file path |
OCP_INSTALLER_VERSION | OpenShift installer version (e.g. 0.15.0) |
OC_VERSION | Maistra origin istiooc_linux version (e.g. 0.10.0) |
OPERATOR_FILE | Maistra Istio operator.yaml file path |
CR_FILE | Istio ControlPlane CR file path |
- Export the environment variables (See the table above) with their values
-
Go to directory "
install
" -
Run "
python main.py -h
" and follow arguments help message. e.g. "python main.py -i -c ocp
" will install an OCP cluster on AWS -
After
Deploying the cluster...
starts, follow the prompts- Select a SSH public key
- Select Platform > aws
- Select a Region
- Select a Base Domain
- Create a Cluster Name
- Paste the Pull Secret content ( This Pull Secret content is different from the environment variable
PULL_SEC
)
-
Waiting for the cluster creation completes. It usually takes 40 - 50 minutes.
-
After the cluster creation, this script automatically downloads a Maistra origin oc client and moves it to
/usr/bin/
. This script also automatically creates a kubectl soft link usingsudo ln -s oc /usr/bin/kubectl
When OCP installation compeleted, you should see INFO message "Install complete!" and following messages which includes export KUBECONFIG value and oc login credential.
- After OCP cluster deployment, follow the INFO message and execute the following two commands manually:
- Run
export KUBECONFIG=[kubeconfig file]
- Run
oc login -u [login user] -p [token]
- Run
5. (Optional) registry-puller
- If you need to pull images from a private registry, install this registry-puller tool on an OCP cluster first.
- Go to directory "
install
" - Run "
python main.py -h
" and follow arguments help message. e.g. "python main.py -i -c registry-puller
" will deploy the registry-puller pod in registry-puller namespace on OCP
-
Go to directory "
install
" -
Run "
python main -h
" and follow arguments help message. e.g. "python main.py -i -c istio
" will install Maistra istio-operator and Istio system on OCP -
Waiting for the Istio system installation completes. It usually takes 10 - 15 minutes
When Istio system installation completed, you should see message "Installed=True, reason=InstallSuccessful".
-
Istio system has been installed on an OpenShift cluster
-
Login the OCP cluster
Go to directory "test/maistra
"
-
To run all the test cases (End-to-End run):
go test -timeout 2h -v
-
To run a specific test case:
go test -run [test case number, e.g. 03] -v
Note: tc_14_authentication_test execution time is more than 10 minutes. If you only want to run tc_14, use -timeout 20m:
go test -run 14 -timeout 20m -v
moitt is Apache 2.0 licensed