diff --git a/CHANGELOG.md b/CHANGELOG.md index b3ff46dd..22a12079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project 2.6.x per each release will be documented in The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [v2.6.0.4] - 2018-05-27 + +### Changed +- Fix an issue which comments out Kubernetes client commands in the deployment management script of WSO2 API Manager deployment pattern 2 + ## [v2.6.0.3] - 2018-05-25 ### Added @@ -26,4 +31,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Kubernetes resources for WSO2 API Management deployment patterns 1 and 2 - Helm resources for WSO2 API Management deployment patterns 1 and 2 -[v2.6.0.3]: https://github.com/wso2/kubernetes-apim/compare/v2.6.0.2...v2.6.0.3 +[v2.6.0.4]: https://github.com/wso2/kubernetes-apim/compare/v2.6.0.3...v2.6.0.4 diff --git a/README.md b/README.md index 3b6a67d7..61d25f3c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ of WSO2 API Manager.* ## Changelog -**Change log** from previous v2.6.0.2 release: [View Here](advanced/CHANGELOG.md) +**Change log** from previous v2.6.0.3 release: [View Here](advanced/CHANGELOG.md) ## Reporting issues diff --git a/advanced/pattern-2/scripts/deploy.sh b/advanced/pattern-2/scripts/deploy.sh index d5a78cad..c03f8299 100755 --- a/advanced/pattern-2/scripts/deploy.sh +++ b/advanced/pattern-2/scripts/deploy.sh @@ -148,98 +148,98 @@ ${TEST} -f ../apim-is-as-km/*.bak && rm ../apim-is-as-km/*.bak ${TEST} -f ../apim-km/*.bak && rm ../apim-km/*.bak ${TEST} -f ../apim-pub-store-tm/wso2apim-pub-store-tm-1-deployment.yaml.bak && rm ../apim-pub-store-tm/*.bak -## create a new Kubernetes Namespace -#${KUBERNETES_CLIENT} create namespace wso2 -# -## create a new service account in 'wso2' Kubernetes Namespace -#${KUBERNETES_CLIENT} create serviceaccount wso2svc-account -n wso2 -# -## switch the context to new 'wso2' namespace -#${KUBERNETES_CLIENT} config set-context $(${KUBERNETES_CLIENT} config current-context) --namespace=wso2 -# -#if [[ ${HAS_SUBSCRIPTION} -eq 0 ]]; then -# # create a Kubernetes Secret for passing WSO2 Private Docker Registry credentials -# ${KUBERNETES_CLIENT} create secret docker-registry wso2creds --docker-server=docker.wso2.com --docker-username=${WSO2_SUBSCRIPTION_USERNAME} --docker-password=${WSO2_SUBSCRIPTION_PASSWORD} --docker-email=${WSO2_SUBSCRIPTION_USERNAME} -#fi -# -## create Kubernetes Role and Role Binding necessary for the Kubernetes API requests made from Kubernetes membership scheme -#${KUBERNETES_CLIENT} create -f ../../rbac/rbac.yaml -# -#echoBold 'Creating Kubernetes ConfigMaps for WSO2 product configurations...' -## create the APIM Analytics ConfigMaps -#${KUBERNETES_CLIENT} create configmap apim-analytics-conf-worker --from-file=../confs/apim-analytics/ -## create the Kubernetes ConfigMaps for API Manager's KeyManager -##${KUBERNETES_CLIENT} create configmap apim-km-conf --from-file=../confs/apim-km/ -##${KUBERNETES_CLIENT} create configmap apim-km-conf-axis2 --from-file=../confs/apim-km/axis2/ -##${KUBERNETES_CLIENT} create configmap apim-km-conf-datasources --from-file=../confs/apim-km/datasources/ -## create the Kubernetes ConfigMaps for Identity Server as Key Manager -#${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf --from-file=../confs/apim-is-as-km/ -#${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf-axis2 --from-file=../confs/apim-is-as-km/axis2/ -#${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf-datasources --from-file=../confs/apim-is-as-km/datasources/ -## create the Kubernetes ConfigMaps for API Manager's Publisher-Store-TM -#${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-1-conf --from-file=../confs/apim-pub-store-tm-1/ -#${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-1-conf-datasources --from-file=../confs/apim-pub-store-tm-1/datasources/ -#${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-2-conf --from-file=../confs/apim-pub-store-tm-2/ -#${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-2-conf-datasources --from-file=../confs/apim-pub-store-tm-2/datasources/ -## create the Kubernetes ConfigMaps for API Manager's Gateway -#${KUBERNETES_CLIENT} create configmap apim-gateway-conf --from-file=../confs/apim-gateway/ -#${KUBERNETES_CLIENT} create configmap apim-gateway-conf-axis2 --from-file=../confs/apim-gateway/axis2 -# -## Kubernetes MySQL deployment (recommended only for evaluation purposes) -#echoBold 'Deploying WSO2 API Manager Databases in MySQL...' -## create a Kubernetes ConfigMap for MySQL database initialization script -#${KUBERNETES_CLIENT} create configmap mysql-dbscripts --from-file=../extras/confs/rdbms/mysql/dbscripts/ -## create Kubernetes persistent storage resources for persisting database data -#${KUBERNETES_CLIENT} create -f ../extras/rdbms/volumes/persistent-volumes.yaml -#${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-persistent-volume-claim.yaml -## create a Kubernetes Deployment for MySQL -#${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-deployment.yaml -## create a Kubernetes Service for MySQL -#${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-service.yaml -#sleep 30s -# -#echoBold 'Creating Kubernetes Services...' -#${KUBERNETES_CLIENT} create -f ../apim-analytics/wso2apim-analytics-service.yaml -##${KUBERNETES_CLIENT} create -f ../apim-km/wso2apim-km-service.yaml -#${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-service.yaml -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-1-service.yaml -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-2-service.yaml -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-service.yaml -#${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-service.yaml -# -#echoBold 'Deploying Kubernetes persistent storage resources...' -#${KUBERNETES_CLIENT} create -f ../volumes/persistent-volumes.yaml -# -#echoBold 'Deploying WSO2 API Manager Analytics...' -#${KUBERNETES_CLIENT} create -f ../apim-analytics/wso2apim-analytics-deployment.yaml -#sleep 1m -# -##echoBold 'Deploying WSO2 API Manager Key Manager...' -##${KUBERNETES_CLIENT} create -f ../apim-km/wso2apim-km-deployment.yaml -##sleep 3m -# -#echoBold 'Deploying WSO2 Identity Server as Key Manager...' -#${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-volume-claim.yaml -#${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-deployment.yaml -#sleep 3m -# -#echoBold 'Deploying WSO2 API Manager Publisher-Store-Traffic-Manager...' -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-volume-claim.yaml -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-1-deployment.yaml -#sleep 2m -#${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-2-deployment.yaml +# create a new Kubernetes Namespace +${KUBERNETES_CLIENT} create namespace wso2 + +# create a new service account in 'wso2' Kubernetes Namespace +${KUBERNETES_CLIENT} create serviceaccount wso2svc-account -n wso2 + +# switch the context to new 'wso2' namespace +${KUBERNETES_CLIENT} config set-context $(${KUBERNETES_CLIENT} config current-context) --namespace=wso2 + +if [[ ${HAS_SUBSCRIPTION} -eq 0 ]]; then + # create a Kubernetes Secret for passing WSO2 Private Docker Registry credentials + ${KUBERNETES_CLIENT} create secret docker-registry wso2creds --docker-server=docker.wso2.com --docker-username=${WSO2_SUBSCRIPTION_USERNAME} --docker-password=${WSO2_SUBSCRIPTION_PASSWORD} --docker-email=${WSO2_SUBSCRIPTION_USERNAME} +fi + +# create Kubernetes Role and Role Binding necessary for the Kubernetes API requests made from Kubernetes membership scheme +${KUBERNETES_CLIENT} create -f ../../rbac/rbac.yaml + +echoBold 'Creating Kubernetes ConfigMaps for WSO2 product configurations...' +# create the APIM Analytics ConfigMaps +${KUBERNETES_CLIENT} create configmap apim-analytics-conf-worker --from-file=../confs/apim-analytics/ +# create the Kubernetes ConfigMaps for API Manager's KeyManager +#${KUBERNETES_CLIENT} create configmap apim-km-conf --from-file=../confs/apim-km/ +#${KUBERNETES_CLIENT} create configmap apim-km-conf-axis2 --from-file=../confs/apim-km/axis2/ +#${KUBERNETES_CLIENT} create configmap apim-km-conf-datasources --from-file=../confs/apim-km/datasources/ +# create the Kubernetes ConfigMaps for Identity Server as Key Manager +${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf --from-file=../confs/apim-is-as-km/ +${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf-axis2 --from-file=../confs/apim-is-as-km/axis2/ +${KUBERNETES_CLIENT} create configmap apim-is-as-km-conf-datasources --from-file=../confs/apim-is-as-km/datasources/ +# create the Kubernetes ConfigMaps for API Manager's Publisher-Store-TM +${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-1-conf --from-file=../confs/apim-pub-store-tm-1/ +${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-1-conf-datasources --from-file=../confs/apim-pub-store-tm-1/datasources/ +${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-2-conf --from-file=../confs/apim-pub-store-tm-2/ +${KUBERNETES_CLIENT} create configmap apim-pub-store-tm-2-conf-datasources --from-file=../confs/apim-pub-store-tm-2/datasources/ +# create the Kubernetes ConfigMaps for API Manager's Gateway +${KUBERNETES_CLIENT} create configmap apim-gateway-conf --from-file=../confs/apim-gateway/ +${KUBERNETES_CLIENT} create configmap apim-gateway-conf-axis2 --from-file=../confs/apim-gateway/axis2 + +# Kubernetes MySQL deployment (recommended only for evaluation purposes) +echoBold 'Deploying WSO2 API Manager Databases in MySQL...' +# create a Kubernetes ConfigMap for MySQL database initialization script +${KUBERNETES_CLIENT} create configmap mysql-dbscripts --from-file=../extras/confs/rdbms/mysql/dbscripts/ +# create Kubernetes persistent storage resources for persisting database data +${KUBERNETES_CLIENT} create -f ../extras/rdbms/volumes/persistent-volumes.yaml +${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-persistent-volume-claim.yaml +# create a Kubernetes Deployment for MySQL +${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-deployment.yaml +# create a Kubernetes Service for MySQL +${KUBERNETES_CLIENT} create -f ../extras/rdbms/mysql/mysql-service.yaml +sleep 30s + +echoBold 'Creating Kubernetes Services...' +${KUBERNETES_CLIENT} create -f ../apim-analytics/wso2apim-analytics-service.yaml +#${KUBERNETES_CLIENT} create -f ../apim-km/wso2apim-km-service.yaml +${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-service.yaml +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-1-service.yaml +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-2-service.yaml +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-service.yaml +${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-service.yaml + +echoBold 'Deploying Kubernetes persistent storage resources...' +${KUBERNETES_CLIENT} create -f ../volumes/persistent-volumes.yaml + +echoBold 'Deploying WSO2 API Manager Analytics...' +${KUBERNETES_CLIENT} create -f ../apim-analytics/wso2apim-analytics-deployment.yaml +sleep 1m + +#echoBold 'Deploying WSO2 API Manager Key Manager...' +#${KUBERNETES_CLIENT} create -f ../apim-km/wso2apim-km-deployment.yaml #sleep 3m -# -#echoBold 'Deploying WSO2 API Manager Gateway...' -#${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-volume-claim.yaml -#${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-deployment.yaml -#sleep 4m -# -#echoBold 'Deploying Kubernetes Ingresses...' -#${KUBERNETES_CLIENT} create -f ../ingresses/wso2apim-gateway-ingress.yaml -#${KUBERNETES_CLIENT} create -f ../ingresses/wso2apim-ingress.yaml -# -#echoBold 'Finished' -#echo 'To access the WSO2 API Manager Management console, try https://wso2apim/carbon in your browser.' -#echo 'To access the WSO2 API Manager Publisher, try https://wso2apim/publisher in your browser.' -#echo 'To access the WSO2 API Manager Store, try https://wso2apim/store in your browser.' + +echoBold 'Deploying WSO2 Identity Server as Key Manager...' +${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-volume-claim.yaml +${KUBERNETES_CLIENT} create -f ../apim-is-as-km/wso2apim-is-as-km-deployment.yaml +sleep 3m + +echoBold 'Deploying WSO2 API Manager Publisher-Store-Traffic-Manager...' +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-volume-claim.yaml +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-1-deployment.yaml +sleep 2m +${KUBERNETES_CLIENT} create -f ../apim-pub-store-tm/wso2apim-pub-store-tm-2-deployment.yaml +sleep 3m + +echoBold 'Deploying WSO2 API Manager Gateway...' +${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-volume-claim.yaml +${KUBERNETES_CLIENT} create -f ../apim-gw/wso2apim-gateway-deployment.yaml +sleep 4m + +echoBold 'Deploying Kubernetes Ingresses...' +${KUBERNETES_CLIENT} create -f ../ingresses/wso2apim-gateway-ingress.yaml +${KUBERNETES_CLIENT} create -f ../ingresses/wso2apim-ingress.yaml + +echoBold 'Finished' +echo 'To access the WSO2 API Manager Management console, try https://wso2apim/carbon in your browser.' +echo 'To access the WSO2 API Manager Publisher, try https://wso2apim/publisher in your browser.' +echo 'To access the WSO2 API Manager Store, try https://wso2apim/store in your browser.'