openshift/training

A guide to deploy logging using downsteam images

Closed this issue · 4 comments

The logging have been removed from the OLM in today's build. So we need to deploy downstream logging manually. Could we provide a document to indicate how to? It is better to provide a quay.io manifests [1]&[2]. Or provide a list of logging image and ask customer to replace the downstream one.

[1]https://github.com/openshift/cluster-logging-operator/blob/master/manifests/05-deployment.yaml
[2]https://github.com/openshift/elasticsearch-operator/blob/master/manifests/05-deployment.yaml

For example:

work_dir=pwd
git_dir="/home/example/src/github.com/openshift/"

function git_sync()
{
cd $git_dir
if [[ -f cluster-logging-operator/.git/config ]]; then
cd $git_dir/cluster-logging-operator
git pull
else
git clone https://github.com/openshift/cluster-logging-operator.git
fi

cd $git_dir
if [[ -f elasticsearch-operator/.git/config ]]; then

cd $git_dir/elasticsearch-operator
git pull
else
git clone https://github.com/openshift/elasticsearch-operator.git
fi
cd $work_dir

}

function deploy_prepare()
{
cd $git_dir/cluster-logging-operator/
EXCLUSIONS="01-namespace.yaml 10-service-monitor-fluentd.yaml 05-deployment.yaml image-references" $git_dir/cluster-logging-operator/hack/deploy-setup.sh
#EXCLUSIONS="10-service-monitor-fluentd.yaml 05-deployment.yaml image-references" $git_dir/cluster-logging-operator/hack/deploy-setup.sh
cd $work_dir

}

function use_quay_io()
{
cp $git_dir/cluster-logging-operator/manifests/05-deployment.yaml cluster-logging-deployment.yaml
cp $git_dir/cluster-logging-operator/hack/cr.yaml cluster-logging-cr.yaml
cp $git_dir/elasticsearch-operator/manifests/05-deployment.yaml elasticsearch-deployment.yaml

sed -i "s#image:.*cluster-logging-operator:latest#image: quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-elasticsearch-operator#" cluster-logging-deployment.yaml
sed -i "s#docker.io/openshift/origin-logging-elasticsearch5:latest#quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-logging-elasticsearch5#" cluster-logging-deployment.yaml
sed -i "s#docker.io/openshift/origin-logging-fluentd:latest#quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-logging-fluentd#" cluster-logging-deployment.yaml
sed -i "s#docker.io/openshift/origin-logging-kibana5:latest#quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-logging-kibana5#"  cluster-logging-deployment.yaml
sed -i "s#docker.io/openshift/origin-logging-curator5:latest#quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-logging-curator5#" cluster-logging-deployment.yaml
sed -i "s#docker.io/openshift/oauth-proxy:latest#quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-oauth-proxy#" cluster-logging-deployment.yaml
sed -i "s#image:.*elasticsearch-operator:latest#image: quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.0.0-0.139.0.0-ose-elasticsearch-operator#" elasticsearch-deployment.yaml

}
#######################
git_sync
deploy_prepare
use_quay_io
deploy_logging

@anpingli is this "missing logging" going to persist during beta drop 1?

@tkatarki

@tkatarki says that logging is out of scope for beta1, so I will close this. Once it comes into scope, it should be automatically installed anyway. Thanks for reporting!