Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KIALI-552 allow developers to build and run multiple kiali versions #159

Merged
merged 4 commits into from Apr 20, 2018

Conversation

@jmazzitelli
Copy link
Contributor

commented Apr 17, 2018

No description provided.

@rhqci

This comment has been minimized.

Copy link
Collaborator

commented Apr 17, 2018

Can one of the admins verify this patch?

@jmazzitelli

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2018

I was able to test this. I built the UI, build kiali "master" and deployed it. I then changed the UI (just added "MAZZZZZ" to the summary table), rebuild kiali under a different branch name ("kiali-552-multi-kiali") and deployed that. I was able to show two UIs as they are running together- look at the URLs specifically here and notice the different UIs:

screenshot from 2018-04-19 10-33-36

screenshot from 2018-04-19 10-33-45

@jmazzitelli jmazzitelli force-pushed the jmazzitelli:KIALI-552-multi-kiali branch from 08c843f to ae88f7b Apr 19, 2018
@jmazzitelli jmazzitelli requested review from pilhuhn and mwringe Apr 19, 2018
Makefile Outdated
# uppercase characters to lowercase characters.
# If we are deploying from a branch, we must ensure all the OS/k8s names to be created
# are unique - the NAME_SUFFIX will be appended to all names so they are unique.
VERSION_LABEL ?= $(shell git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]')

This comment has been minimized.

Copy link
@pilhuhn

pilhuhn Apr 19, 2018

Contributor

Aren't there other restrictions on "bad characters" like underscore?

This comment has been minimized.

Copy link
@mwringe

mwringe Apr 19, 2018

Contributor

The rules are as follows, and yes it will fail if your branch contains an invalid character (such as an '_'):

a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character e.g. 'my-name', or '123-abc', regex used for validation is

 '[a-z0-9]([-a-z0-9]*[a-z0-9])?'
@mwringe

This comment has been minimized.

Copy link
Contributor

commented Apr 19, 2018

This looks good to me.

Do we want to update the docs on how people can run multiple versions with tagged docker images?

@jmazzitelli

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2018

I enhanced the Makefile - if the branch name has a underscore, it will be replaced with a dash.
It will also abort the build if the VERSION_LABEL (whether set explicitly as an env var passed to the Makefile or whether set by the Makefile based on the branch name) does not follow proper syntax - that's what this code does:

VERSION_LABEL_VALID = $(shell [[ ${VERSION_LABEL} =~ ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$$ ]] && echo valid)
ifneq (${VERSION_LABEL_VALID},valid)
  $(error Your version label '${VERSION_LABEL}' is invalid and cannot be used.)
endif
@jmazzitelli

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2018

great, works on my RHEL box, but not on travis. :/

pilhuhn and others added 4 commits Apr 16, 2018
…erent labels.

so its not possible to have N services all called "kiali" in the same istio-system namespace.
so we have to create unique names.
…per label syntax.

check to make sure the version label conforms; if it does not, fail the build
@jmazzitelli jmazzitelli force-pushed the jmazzitelli:KIALI-552-multi-kiali branch from 9533cb1 to 7b8a2f7 Apr 19, 2018
@jmazzitelli

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2018

OK, this should go green now. If so, this is ready for review and merge.

Once merged, we should update the github.io docs to explain how to use it. To use it, just work in a branch and you will deploy it to a route with that named branch. To override (say you don't want to work in a environment like that but you want to work as if things are deployed while in master) just pass in VERSION_LABEL=master to make: VERSION_LABEL=master make openshift-deploy

@jmazzitelli jmazzitelli referenced this pull request Apr 19, 2018
@jmazzitelli jmazzitelli changed the title [WIP] KIALI-552 allow developers to build and run multiple kiali versions KIALI-552 allow developers to build and run multiple kiali versions Apr 19, 2018
@mwringe mwringe merged commit 4926dd9 into kiali:master Apr 20, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jmazzitelli jmazzitelli deleted the jmazzitelli:KIALI-552-multi-kiali branch May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.