Giter Club home page Giter Club logo

fuse-online-install's Introduction

fuse-online-install

Installation

You can directly install from this repository for a specific fuse-online version. Installation is performed with install_ocp.sh. This script can be downloaded or executed directly from a cloned git repository:

# or git clone the repository and switch to tag 1.12
$ git clone https://github.com/syndesisio/fuse-online-install
$ cd fuse-online-install
$ git checkout 1.12

Installation of Fuse Online consists of three steps:

  1. You need setup authentication for registry.redhat.io. Fuse Online requires a pull secret named syndesis-pull-secret to be present (See https://access.redhat.com/RegistryAuthentication)

  2. You have to register first a custom resource on cluster level and allow a user to install Syndesis in his project. You need cluster admin permissions for doing this.

  3. Fuse Online itself is then installed in a third step, which is performed as a regular user.

Registry Authentication

The install script will create an image pull secret in order to access images in the Red Hat registry (registry.redhat.io). If the secret is present, this step is skipped.

One-off admin setup step

For the second step you have to be connected as a cluster admin to the OCP cluster where you want install Fuse Online into.

Verify that you are properly connected and can list custom resources

$ oc get crd

When this command works for you without error you can call install_ocp.sh to register the CRD on cluster level.

$ bash install_ocp.sh --setup

You can also grant permissions to a the user who will eventually install Fuse Online in his project. In order to allow user developer to install Fuse Online into the currently connect project use

$ bash install_ocp.sh --grant developer

(You can read the current project with oc project). However, if the user deletes this project and recreates it, or want to install Fuse Online into a different project use the following command to grant cluster wide usage:

$ bash install_ocp.sh --grant developer --cluster

You can also combine both calls to a single call

$ bash install_ocp.sh --setup --grant developer --cluster

These steps need to be performed only once. However, if you want to add additional users, just call --grant for each user to add.

Install Fuse Online

If this setup has been performed successfully, you can switch to admin user who you just have granted access (e.g. "developer" in the example above):

$ oc login -u developer

Then you can install Fuse Online with just

$ bash install_ocp.sh

You can use several options to tune the installation process. Call bash install_ocp.sh --help for all options possible:

$ bash install_ocp.sh --help

Fuse Online Installation Tool for OCP

Usage: install_ocp.sh [options]

with options:

-s  --setup                   Install CRDs clusterwide. Use --grant if you want a specific user to be
                              able to install Fuse Online. You have to run this option once as cluster admin.
-u  --grant <user>            Add permissions for the given user so that user can install the operator
                              in her projects. You have to run this as cluster-admin
    --cluster                 Add the permission for all projects in the cluster
                              (only when used together with --grant)
   --force                    Override an existing installation if present
-p --project <project>        Install into this project. The project will be deleted
                              if it already exists. By default, install into the current project (without deleting)
   --skip-pull-secret         Skip the creation of the pull-secret. By default, will create or replace the pull-secret.
-w --watch                    Wait until the installation has completed
-o --open                     Open Fuse Online after installation (implies --watch)
                              (version is optional)
   --help                     This help message
-v --verbose                  Verbose logging

You have to run `--setup --grant <user>` as a cluster-admin before you can install Fuse Online as a user.

When you call install_ocp.sh it will install Fuse Online in this current project. You can choose a different project with the option --project <project>. Please be aware that this project will be deleted if it already exists. Also, you must have used the option --cluster when you set up the CRDs.

Example

The simplest way to install Fuse Ignite with no log URL enabled is

# Install with no link to the runtime pod's log
$ bash install_ocp.sh

For recreating the current project:

$ bash install_ocp.sh --project $(oc project -q)

Update

For updating an existing installation you should use the script update_ocp.sh. This script know the following options (which you get with --help):

Fuse Online Update Tool for OCP

Usage: update_ocp.sh [options]

with options:

   --skip-pull-secret         Skip the creation of the pull-secret. By default, will create or replace the pull-secret.
   --version                  Print target version to update to and exit.
-v --verbose                  Verbose logging

To start the update, call it without any option. The installation will be updated to the version to which this update script belogns. Use --version to see what are you going to update to:

$ bash update_ocp.sh --version
Update to Fuse Online 1.12

syndesis-operator:  1.12.5

Release

This section describes the release process.

A release is performed with the included release.sh script.

All configuration is set in common_config.sh:

# Tag for release. Update this before running release.sh
TAG_FUSE_ONLINE_INSTALL=1.8.0

# Fuse minor version (update it manually)
TAG=1.8

# Common settings
CURRENT_OS=$(get_current_os)
BINARY_FILE_EXTENSION=$(get_executable_file_extension)
OC_MIN_VERSION=3.9.0

# Syndesis settings
SYNDESIS_VERSION=1.8.1-20190920
SYNDESIS_BINARY=syndesis
SYNDESIS_GIT_ORG=syndesisio
SYNDESIS_GIT_REPO=syndesis
SYNDESIS_DOWNLOAD_URL=https://github.com/${SYNDESIS_GIT_ORG}/${SYNDESIS_GIT_REPO}/releases/download/${SYNDESIS_VERSION}/syndesis-${SYNDESIS_VERSION}-${CURRENT_OS}-64bit.tgz

When the config file is setup, a release is performed by simply calling bash release.sh. Some options are available, see below for which one.

The release process will perform the following steps (the variables are taken from common_config.sh):

  • Commit everything
  • Git tag with $TAG_FUSE_ONLINE_INSTALL
  • Create a moving tag corresponding to the $TAG variable
  • Git push if --git-push is given

The script understands some additional options:

Release tool for fuse-online OCP

Usage: bash release.sh [options]

with options:

--help                       This help message
--git-push                   Push to git directly
--verbose                    Verbose log output

Please check also "common_config.sh" for the configuration values.

Importing images

You can easily import images from one registry to an OpenShift internal registry, where these images then appear as Imagestreams in the project which is called like the image's repo.

You call e.g. with

cd utils
perl ./import_images.pl --registry docker.io --repo fuseignitetest

where --registry is the target registry an --repo is the repository part of the target image name (default: fuse-ignite)

This script will pick up the version numbers defined in fuse_online_config.sh and should be called right after a release from a release tag, e.g.

# Be sure to be oc-connected with the target OpenShift cluster
$ oc login ...

# Clone repo
$ git clone https://github.com/syndesisio/fuse-online-install.git
$ cd fuse-online-install

# Checkout tag
$ git checkout 1.8.0

# Login into the target registry for your docker daemon
$ docker login -u $(oc whoami) -p $(oc whoami -t) mytarget.registry.openshift.com

# Import images
$ cd utils
$ perl import_images.pl --registry mytarget.registry.openshift.com

fuse-online-install's People

Contributors

avano avatar christophd avatar claudio4j avatar dhirajsb avatar dsimansk avatar gashcrumb avatar heiko-braun avatar mkralik3 avatar mmuzikar avatar nicolaferraro avatar paoloantinori avatar phantomjinx avatar pure-bot[bot] avatar rhuss avatar rnetuka avatar tovacohen avatar valdar avatar vhalbert avatar zregvart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuse-online-install's Issues

[Install] Unbound variable

pull secret 'syndesis-pull-secret' present, skipping creation ...
./install_ocp.sh: line 321: $2: unbound variable
...

doesn't affect the functionality

Operator deployment from 1.6.x fails due to missing changes in resources

bash install_ocp.sh --setup
bash install_ocp.sh
{"level":"info","ts":1554297516.0242584,"logger":"cmd","msg":"Using template","template":"/conf/syndesis-template.yml"}
{"level":"info","ts":1554297516.024355,"logger":"cmd","msg":"Go Version: go1.10.2"}
{"level":"info","ts":1554297516.0243587,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1554297516.0243912,"logger":"cmd","msg":"Version of operator-sdk: v0.5.0"}
{"level":"info","ts":1554297516.0245988,"logger":"leader","msg":"Trying to become the leader."}
{"level":"error","ts":1554297516.0932744,"logger":"cmd","msg":"","error":"required env POD_NAME not set, please configure downward API","stacktrace":"github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\nmain.main\n\t/go/src/github.com/syndesisio/syndesis/install/operator/cmd/syndesis-operator/main.go:68\nruntime.main\n\t/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/proc.go:198"}

the resources for the operator need to be updated to latest changes

cc @heiko-braun

Configuration of image repository

Right now references to image repository are "hard-coded". It would be good if this is configurable somehow so I can use Nexus, Artifactory, Quay, Satellite etc. as an image repository.

1.6.x branch misses image stream for postgres exporter

DB deployment doesn't start at the moment:

NAME                          READY     STATUS      RESTARTS   AGE
syndesis-meta-1-bc8pn         1/1       Running     0          18m
syndesis-oauthproxy-1-nqmrm   1/1       Running     0          18m
syndesis-operator-1-rm4fk     1/1       Running     0          18m
syndesis-prometheus-1-bl4tp   1/1       Running     0          18m
syndesis-server-1-deploy      0/1       Error       0          18m
syndesis-ui-1-q87mt           1/1       Running     0          18m
todo-1-build                  0/1       Completed   0          18m
todo-1-gg6nb                  1/1       Running     0          16m
oc get dc syndesis-db
syndesis-db           0          1         0         config,image(postgres_exporter:v0.4.7),image(postgresql:9.5)
oc get is
NAME                   DOCKER REPO                                     TAGS      UPDATED
fuse-ignite-meta       172.30.1.1:5000/syndesis/fuse-ignite-meta       1.6       19 minutes ago
fuse-ignite-s2i        172.30.1.1:5000/syndesis/fuse-ignite-s2i        1.6       19 minutes ago
fuse-ignite-server     172.30.1.1:5000/syndesis/fuse-ignite-server     1.6       19 minutes ago
fuse-ignite-ui         172.30.1.1:5000/syndesis/fuse-ignite-ui         1.6       19 minutes ago
fuse-online-operator   172.30.1.1:5000/syndesis/fuse-online-operator   1.6       19 minutes ago
jboss-amq-63           172.30.1.1:5000/syndesis/jboss-amq-63           1.3       19 minutes ago
oauth-proxy            172.30.1.1:5000/syndesis/oauth-proxy            v1.1.0    26 minutes ago
prometheus             172.30.1.1:5000/syndesis/prometheus             v2.1.0    26 minutes ago
todo                   172.30.1.1:5000/syndesis/todo                   latest    17 minutes ago

Consider use of floating tag reference in ImageStream

We currently have specific reference to patch(build) level of Docker image from RH registry. Therefor when new image is published due to update in underlayers, e.g. RHEL or OpenJDK we can't point users to do oc import-image fuse-ignite-server:1.3. But the whole image Docker image reference needs to be replaced. Probably the most smooth way is something like oc replace -f updated-is.yml.

There's another way to:

  • remove scheduled: true - to prevent periodical pulls on floating tag
  • reference Docker image with floating tag 1.0
    • e.g. registry.access.redhat.com/fuse7/fuse-ignite-ui:1.0

When created new from scarth the images are imported for the first time. Then on image update release to pick it up only oc import-image {isName}:{istag} is required. This is outside of whole upgrade flow, when only images itself are changing.

https://github.com/syndesisio/fuse-ignite-install/blob/c6fb91dc982042635f381c6028c7e828e01db7dd/templates/fuse-ignite-image-streams.yml#L3-L18

Cc @rhuss @paoloantinori

update_ocp.sh should apply the changes done in 7.3

currently the update_ocp.sh just updates the image streams:

# Check for OC
setup_oc
# Check whether there is an installation
check_error "$(check_syndesis)"
minor_tag=$(extract_minor_tag $TAG)
# make sure pull secret is present, only required from
# 7.2 to 7.3. Link operator SAs to the secret.
if [ "git_fuse_online_install" = "1.6.x" ]; then
create_secret_if_not_present
for sa in syndesis-operator camel-k-operator
do
if $(check_resource sa $sa) ; then
local result=$(oc secrets link $sa syndesis-pull-secret --for=pull >$ERROR_FILE 2>&1)
check_error $result
fi
done
fi
# Add new ImageStream tags from the version in fuse_online_config.sh
echo "Update imagestreams in $project"
update_imagestreams "$TAG" "$minor_tag"
# Update operator's image stream, which will trigger a redeployment
echo "Update operator imagestream"
update_operator_imagestream "$TAG" "$minor_tag"

however there are necessary changes to roles and deployment config of the operator (summary here: https://github.com/syndesisio/fuse-online-install/pull/84/files) + there is new image stream for postgres exporter (https://github.com/syndesisio/fuse-online-install/pull/88/files) that isn't taken into the account during the upgrade

Currently after the upgrade, the operator doesn't start:

syndesis-db-1-dbpvl           1/1       Running            0          31m
syndesis-meta-1-6hl7c         1/1       Running            0          31m
syndesis-oauthproxy-1-vp4dc   1/1       Running            0          31m
syndesis-operator-2-vh578     0/1       CrashLoopBackOff   9          24m
syndesis-prometheus-1-td8md   1/1       Running            0          31m
syndesis-server-1-j8dnz       1/1       Running            0          31m
syndesis-ui-1-nr45k           1/1       Running            0          31m
todo-1-7lvwj                  1/1       Running            0          29m
todo-1-build                  0/1       Completed          0          31m

[Upgrade] Upgrade never completes as it is missing the komodo image stream


EDIT:
1.7.23 with cherry-picked ac17a60 , see #170 (comment)


1.7.22:

./update_ocp.sh                                                                                                                      
./update_ocp.sh: line 194: $2: unbound variable
Update imagestreams in avano-upgrade
Importing <registry>/fuse7/fuse-ignite-server:1.4-14 to fuse-ignite-server:1.7
Importing <registry>/fuse7/fuse-ignite-server:1.4-14 to fuse-ignite-server:1.7.22
Importing <registry>/fuse7/fuse-ignite-ui:1.4-6 to fuse-ignite-ui:1.7
Importing <registry>/fuse7/fuse-ignite-ui:1.4-6 to fuse-ignite-ui:1.7.22
Importing <registry>/fuse7/fuse-ignite-meta:1.4-13 to fuse-ignite-meta:1.7
Importing <registry>/fuse7/fuse-ignite-meta:1.4-13 to fuse-ignite-meta:1.7.22
Importing <registry>/fuse7/fuse-ignite-s2i:1.4-13 to fuse-ignite-s2i:1.7
Importing <registry>/fuse7/fuse-ignite-s2i:1.4-13 to fuse-ignite-s2i:1.7.22
Importing <registry>/fuse7/fuse-ignite-postgres_exporter:1.4-3 to fuse-ignite-postgres_exporter:1.7
Can't import

As you can see in the exporter:
<registry>/fuse7/fuse-ignite-postgres_exporter:1.4-3

  • the correct namespace should be fuse7-tech-preview
  • the correct image name is fuse-postgres-exporter

to fuse-ignite-postgres_exporter:1.7

  • the correct image stream name is postgres_exporter

[clarification] image streams and tags don't line up

oc version detection fails

Using branch 1.4.8, and the official Fuse Online install docs at

https://access.redhat.com/documentation/en-us/red_hat_fuse/7.1/html-single/integrating_applications_with_fuse_online/#installing-on-ocp

The install_ocp script does:

oc version | grep oc | tr -d oc\ v | cut -f1 -d "+"

to do some version checking.

This renders the output:

3.10.45
Sererhttps://skylake.demlab.lal:8443

From the basic output:

oc v3.10.45
kubernetes v1.10.0+b81c8f8
features: Basic-Auth

Server https://skylake.demolab.local:8443
openshift v3.10.14
kubernetes v1.10.0+b81c8f8

The install script then tries to use this output to do min/test versioning, which results in an execution failure, and the error message:

Testing oc version '3.10.45' against required minimum 'Sererhttps://skylake.demlab.lal:8443' ... ERROR: oc version (3.10.45) should be at least Sererhttps://skylake.demlab.lal:8443

Which is just all kinds of wrong :)

Support for different image versions?

While trying the latest productized images, I have noticed they do not share a common version. Probably due to rebuild or errors, they have different specific versions.

This is incompatible with our current script that assumes everything uses the same one.

Problem is easy to solve, externalizing each one of them and eventually defaulting to a main version.
Do we want to do this or do we have better approaches?

[1.7.5] On first attempt, install_ocp.sh fails

hbraun:fuse-online-install ((HEAD detached at 1.7.5))$ bash install_ocp.sh
pull secret 'syndesis-pull-secret' present, skipping creation ...
Ensuring imagestreams in 1-7-4
Deploying Syndesis operator
ERROR: Cannot create remote resource https://raw.githubusercontent.com/syndesisio/fuse-online-install/1.7.5/resources/fuse-online-operator.yml

Make upgrade_ocp.sh self contained

so that it can be directly downloaded. Up to now, it requires fuse_online_config.sh to source, but it's much more user-friendly to have a single file.

[Upgrade] unbound variable

1.7.22:

./update_ocp.sh                                                                                                                      
./update_ocp.sh: line 194: $2: unbound variable
Update imagestreams in avano-upgrade
...

Is seems to have no effect to the functionality

[clarification] Typo in fuse-online-upgrade image

The fuse-online-upgrade image is defined as fuse-ignite-uprade in the pod definition [1]. This image doesn't exist in the registry and doesn't match the image defined in the template [2].

Should this be defined as registry.redhat.io/fuse7/fuse-ignite-upgrade:<tag> instead?

[1] https://github.com/syndesisio/fuse-online-install/blob/master/resources/fuse-online-upgrade.yml#L8
[2] https://github.com/syndesisio/fuse-online-install/blob/master/resources/fuse-online-template.yml#L1673

Online registration app misses parameter SAR_PROJECT

Apparently the provisioning app doesn't use the SAR_PROJECT parameter yet:

error: error processing template "fuse-ignite/fuse-ignite-1.5": Template.template.openshift.io "fuse-ignite-1.5" is invalid: template.parameters[4]: Required value: template.parameters[4]: parameter SAR_PROJECT is required and must be      

It has been added in 7.2.

See also syndesisio/syndesis#3687

[camel-k] fuse-java-openshift is no longer tech-preview

install_ocp.sh script needs to be changed as following code no longer works:

$kamel install --skip-cluster-setup --maven-repository $MAVEN_REPOSITORY --base-image $REGISTRY/$REPOSITORY/fuse-java-openshift:$JAVA_BASE_IMAGE_TAG --context jvm $extra_opts

$REPOSITORY points to fuse7-tech-preview but image fuse-java-openshift is no longer tech preview and the repository should point to fuse7

We can not just change the property value as it is used with camel-k image which is still TP.

ImageStreamTag misleading

ImageStreamTag name property is currently set to a specific version.

I'm in the process to change that since I'm moving to the productized image (using a different docker registry and version), but I can't modify the tag "name" otherwise my resources will no longer able to point to that tag.

I've ended up in the stuation where I have a tag name called v1.1.0 populated by an image called registry.access.redhat.com/openshift3/prometheus:v3.9.25-1

--camel-k flags don't work

I think there are several issues at play here:

  • camel-k images reside under fuse-tech-preview, but the scripts refer to fuse7
  • pulling from registry.access.redhat.com as suggested in [1] doesn't work, however pulling form registry.redhat.io does, hence this repository should be used (http proxy issues)?
  • with all the above fixed, `bash install_ocp.sh --camel-k' installs camel-k, but but not syndesis (could be an issue with my minishift)

[1] https://access.redhat.com/containers/?tab=images#/registry.access.redhat.com/fuse7-tech-preview/fuse-camel-k

[1.7.7] Mismatch between imagestreams in fuse-online-install and operator template

fuse-online-install specifies the image stream for data virt as fuse-ignite-komodo and the tag as 1.7:

- apiVersion: v1
kind: ImageStream
metadata:
name: fuse-ignite-komodo
annotations:
openshift.io/image.insecureRepository: "true"
labels:
syndesis.io/app: syndesis
syndesis.io/type: infrastructure
syndesis.io/component: komodo-server
spec:
tags:
- from:
kind: DockerImage
name: brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/fuse-7-tech-preview/data-virtualization-server:1.4-1
importPolicy:
scheduled: true
name: "1.7"

however the internal template in the operator expects:

from:
          kind: ImageStreamTag
          name: fuse-komodo-server:latest

There are two issues logged for that: https://issues.jboss.org/browse/ENTESB-11036 https://issues.jboss.org/browse/ENTESB-11037

So either those two will be scheduled for CR2, or we need to edit the resources in fuse-online-install.

Auto extract target image stream tag from config

Currently the target imagestream tag (e.g. 1.4) is hardcoded in import_images.pl. However this information is also available in fuse_online_config.sh as the first two digets of git_fuse_online_install.

The import script should evaluate this number and use it for the import.

Generate productised Operator

The productised operator also includes the productised template. Actually it should be build from within productisation build, but it would be helpful to provide productisation some assistance to showcase the build here, too.

Related to syndesisio/syndesis#2888

bash update_ocp.sh --version not working

@tmielke commented on Thu Dec 13 2018

This is a...


[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Documentation issue or request

Description

Following the 10.6. Upgrade Fuse Online on OCP documentation

in step 4 I am told to run

$ bash update_ocp.sh --version

but the script fails with

update_ocp.sh: line 385: /Users/tmielke/Downloads/fuse_online_config.sh: No such file or directory

ansible role/playbook

Hello,
Is there an ansible role and playbook to run the installation instead of running a bash script? If not, is there some kind of interest in one?

Don't request credentials when pulling form brew

We only needs creds when pulling from registry.redhat.io. The prompt that asks for user/pass and the whole pull secret setup should be skipped when pulling from brew (see registry attribute in cfg)

Issues with install_ocp.sh script

I'm trying the install_ocp.sh script from master against my minishift:

  1. unable to call install_ocp without parameters:
git/github/fuse-online-install  master :: bash install_ocp.sh
install_ocp.sh: line 63: ARGS[@]: unbound variable
install_ocp.sh: line 63: ARGS[@]: unbound variable
install_ocp.sh: line 63: ARGS[@]: unbound variable
install_ocp.sh: line 77: ARGS[@]: unbound variable

git/github/fuse-online-install  master :: echo $?
1

you can workaround that with specifying some parameter, for example "-f"

  1. script is unable to create a new custom resource:
git/github/fuse-online-install  master :: bash install_ocp.sh -f
Ensuring imagestreams in myproject
Deploying Syndesis operator
Waiting for syndesis-operator to be scaled to 1
Sleeping 10s ...
NAME                         READY     STATUS    RESTARTS   AGE
syndesis-operator-1-deploy   0/1       Pending   0          0s
syndesis-operator-1-deploy   0/1       Pending   0         0s
syndesis-operator-1-deploy   0/1       ContainerCreating   0         0s
syndesis-operator-1-dqbpx   0/1       Pending   0         0s
syndesis-operator-1-dqbpx   0/1       Pending   0         0s
syndesis-operator-1-dqbpx   0/1       ContainerCreating   0         0s
Sleeping 10s ...
syndesis-operator-1-deploy   1/1       Running   0         2s
syndesis-operator-1-dqbpx   1/1       Running   0         2s
syndesis-operator-1-deploy   0/1       Completed   0         4s
syndesis-operator-1-deploy   0/1       Terminating   0         4s
syndesis-operator-1-deploy   0/1       Terminating   0         4s
Creating Syndesis resource
error: error converting YAML to JSON: yaml: line 7: mapping values are not allowed in this context
ERROR: Error while creating resource apiVersion: "syndesis.io/v1alpha1" kind: "Syndesis" metadata: name: "app" spec: integration: # No limitations by default on OCP limit: 0 imageStreamNamespace: "myproject"

===============================================================

serviceaccount "syndesis-operator" created
role "syndesis-operator" created
rolebinding "syndesis-operator:install" created
rolebinding "syndesis-operator:view" created
rolebinding "syndesis-operator:edit" created
imagestream "fuse-online-operator" created
deploymentconfig "syndesis-operator" created

3. when there are no image streams, the script will create them in current project, as it is checking them in the current project:
https://github.com/syndesisio/fuse-online-install/blob/master/install_ocp.sh#L341-L342
but the operator expects them to be in fuse-ignite namespace

^ that was my mistake, I created the custom resource manually and I was missing the image stream namespace

  1. there is missing tag for 1.4.7. in the repository that will correspond to CR2 version

Update support in install_ocp.sh

For updating on Fuse Online on OCP one has to update the Operator Image. This can be done in two ways:

  • Either move the imagestream tag used in the operator's DC to the new version of the operator. Then an image trigger in OpenShift will automatically redeploy the operator in the new version which then, when started will start the update pod. This method is suitable for patch version updates (e.g. from 7.1.0 to 7.1.1)
  • Update the image reference in the DC to a new ImageStreamTag (e.g. from 1.4 to 1.5). This also will trigger a redeployment but with a new imagestreamtag. This strategy is useful for minor upgrades (e.g. from 7.1 to 7.2)

The script 'install_ocp.sh' could help here so when it run and it detects that already a "Syndesis" resource exists of an older versions, it just performs one of the actions above (but not sure whether it has the proper permissions on the imagestreams). Its a bit tricky to make it automatically, but might be possible.

@heiko-braun @tplevko what do you think ?

But maybe there is another possibility to apply the new operator image. @tplevko how did you do this in your tests ?

Unable to install as basic user on OCP 4.X

oc login -u admin -p admin <cluster>

./install_ocp.sh --setup                                                       
Installing Syndesis CRD

./install_ocp.sh --grant developer --cluster
Grant permission to create Syndesis to user developer

oc login -u developer -p developer <cluster>
./install_ocp.sh                            
pull secret 'syndesis-pull-secret' is missing, creating ...
enter username for registry.redhat.io and press [ENTER]: 
[email protected]
enter password for registry.redhat.io and press [ENTER]: 
Ensuring imagestreams in syndesis
Deploying Syndesis operator
ERROR: Cannot create remote resource ./resources/fuse-online-operator.yml

The underlying error is:

oc create -f resources/fuse-online-operator.yml
Error from server (Forbidden): error when creating "resources/fuse-online-operator.yml": roles.rbac.authorization.k8s.io "syndesis-operator" is forbidden: user "developer" (groups=["system:authenticated:oauth" "system:authenticated"]) is attempting to grant RBAC permissions not currently held:
{APIGroups:["extensions"], Resources:["deployments/rollback"], Verbs:["get" "list" "watch"]}
Error from server (NotFound): error when creating "resources/fuse-online-operator.yml": roles.rbac.authorization.k8s.io "syndesis-operator" not found

[camel-k] Can't install camel-k on fedora, permissions error

Command bash install_ocp.sh --setup --camel-k fails on fedora due to permissions issue.

Workaround:
Add :z to docker run command which tries to copy kamel:

docker run -v $tmp_dir/:/client:z \
                 --entrypoint bash \
                 $REGISTRY/$REPOSITORY/fuse-camel-k:$CAMEL_K_TAG\
                 -c "tar xf /opt/clients/camel-k-client-$os.tar.gz; cp kamel /client/" >$ERROR_FILE 2>&1

releash.sh fails on Fedora

I still have my Mac kicking around so not a blocker, but running release.sh didn't work on my newly set up laptop:

] bash release.sh --verbose
++(release.sh:278): main(): basedir
++(release.sh:33): basedir(): local script=release.sh
++(release.sh:36): basedir(): '[' -L release.sh ']'
+++(release.sh:49): basedir(): dirname release.sh
++(release.sh:49): basedir(): local dir=.
+++(release.sh:50): basedir(): cd .
+++(release.sh:50): basedir(): pwd
++(release.sh:50): basedir(): local full_dir=/home/gashcrumb/Source/fuse-online-install
++(release.sh:51): basedir(): echo /home/gashcrumb/Source/fuse-online-install
+(release.sh:278): main(): release /home/gashcrumb/Source/fuse-online-install
+(release.sh:225): release(): local topdir=/home/gashcrumb/Source/fuse-online-install
+(release.sh:227): release(): source /home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:2): source(): git_fuse_online_install=1.5.10
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:5): source(): tag_server=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:6): source(): tag_ui=1.2-2
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:7): source(): tag_meta=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:8): source(): tag_s2i=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:9): source(): tag_upgrade=1.2-7
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:10): source(): tag_operator=1.2-6
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:13): source(): repository=fuse7
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:16): source(): registry=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
+(release.sh:229): release(): '[' -z 1.5.10 ']'
+(release.sh:234): release(): create_resources /home/gashcrumb/Source/fuse-online-install 1.5.10
+(release.sh:167): create_resources(): local topdir=/home/gashcrumb/Source/fuse-online-install
+(release.sh:168): create_resources(): local fuse_online_tag=1.5.10
+(release.sh:171): create_resources(): source /home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:2): source(): git_fuse_online_install=1.5.10
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:5): source(): tag_server=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:6): source(): tag_ui=1.2-2
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:7): source(): tag_meta=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:8): source(): tag_s2i=1.2-4
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:9): source(): tag_upgrade=1.2-7
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:10): source(): tag_operator=1.2-6
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:13): source(): repository=fuse7
++(/home/gashcrumb/Source/fuse-online-install/fuse_online_config.sh:16): source(): registry=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
+(release.sh:173): create_resources(): local is_tag
+(release.sh:174): create_resources(): '[' 1.5.10 = master ']'
++(release.sh:177): create_resources(): extract_minor_version 1.5.10
++(release.sh:143): extract_minor_version(): local version=1.5.10
+++(release.sh:144): extract_minor_version(): echo 1.5.10
+++(release.sh:144): extract_minor_version(): sed -E -n 's/([0-9]+\.[0-9]+).*/\1/p'
++(release.sh:144): extract_minor_version(): local minor_version=1.5
++(release.sh:145): extract_minor_version(): '[' 1.5 = 1.5.10 ']'
++(release.sh:149): extract_minor_version(): echo 1.5
+(release.sh:177): create_resources(): is_tag=1.5
+(release.sh:180): create_resources(): local insecure=false
+(release.sh:181): create_resources(): '[' -pulp-docker01.web.prod.ext.phx2.redhat.com:8888 '!=' brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888 ']'
+(release.sh:182): create_resources(): insecure=true
+(release.sh:185): create_resources(): echo '==== Patch install script with tag'
==== Patch install script with tag
+(release.sh:186): create_resources(): for file in install_ocp.sh update_ocp.sh
+(release.sh:187): create_resources(): sed -e 's/^TAG=.*$/TAG=1.5.10/' -i.bak /home/gashcrumb/Source/fuse-online-install/install_ocp.sh
+(release.sh:188): create_resources(): rm /home/gashcrumb/Source/fuse-online-install/install_ocp.sh.bak
+(release.sh:186): create_resources(): for file in install_ocp.sh update_ocp.sh
+(release.sh:187): create_resources(): sed -e 's/^TAG=.*$/TAG=1.5.10/' -i.bak /home/gashcrumb/Source/fuse-online-install/update_ocp.sh
+(release.sh:188): create_resources(): rm /home/gashcrumb/Source/fuse-online-install/update_ocp.sh.bak
+(release.sh:191): create_resources(): echo '==== Patch imagestream script with current versions'
==== Patch imagestream script with current versions
+(release.sh:192): create_resources(): sed -e 's/{{[ ]*Tags.Online[ ]*}}/1.5/g' -e 's/{{[ ]*Tags.Online.Operator[ ]*}}/1.2-6/g' -e 's/{{[ ]*Docker.Registry[ ]*}}/brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/g' -e 's/{{[ ]*Docker.Image.Repository[ ]*}}/fuse7/g' -e 's/{{[ ]*Docker.Registry.Insecure[ ]*}}/true/g' /home/gashcrumb/Source/fuse-online-install/templates/fuse-online-operator.yml
+(release.sh:200): create_resources(): sed -e 's/{{[ ]*Tags.Online[ ]*}}/1.5/g' -e 's/{{[ ]*Tags.Online.Server[ ]*}}/1.2-4/g' -e 's/{{[ ]*Tags.Online.Ui[ ]*}}/1.2-2/g' -e 's/{{[ ]*Tags.Online.Meta[ ]*}}/1.2-4/g' -e 's/{{[ ]*Tags.Online.S2I[ ]*}}/1.2-4/g' -e 's/{{[ ]*Docker.Registry[ ]*}}/brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/g' -e 's/{{[ ]*Docker.Image.Repository[ ]*}}/fuse7/g' -e 's/{{[ ]*Docker.Registry.Insecure[ ]*}}/true/g' /home/gashcrumb/Source/fuse-online-install/templates/fuse-online-image-streams.yml
+(release.sh:211): create_resources(): sed -e 's/{{[ ]*Tags.Online.Upgrade[ ]*}}/1.2-7/g' -e 's/{{[ ]*Docker.Registry[ ]*}}/brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/g' -e 's/{{[ ]*Docker.Image.Repository[ ]*}}/fuse7/g' /home/gashcrumb/Source/fuse-online-install/templates/fuse-online-upgrade.yml
+(release.sh:217): create_resources(): echo '==== Extract Template from Operator image'
==== Extract Template from Operator image
++(release.sh:218): create_resources(): pwd
+(release.sh:218): create_resources(): docker run -v /home/gashcrumb/Source/fuse-online-install/resources:/resources --entrypoint bash brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/fuse7/fuse-online-operator:1.2-6 -c 'cp /conf/syndesis-template.yml /resources/fuse-online-template.yml'
cp: failed to access '/resources/fuse-online-template.yml': Permission denied

Is that path supposed to be relative?

[1.7.5] Failed to start operator

with bash install_ocp.sh and some tricks to access brew images, I get this error when the operator starts:

{"level":"info","ts":1562927855.5895364,"logger":"cmd","msg":"Using template","template":"/conf/syndesis-template.yaml"}
{"level":"info","ts":1562927855.589842,"logger":"cmd","msg":"Go Version: go1.10.2"}
{"level":"info","ts":1562927855.5898652,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1562927855.5899286,"logger":"cmd","msg":"Version of operator-sdk: v0.8.0"}
{"level":"info","ts":1562927855.590316,"logger":"leader","msg":"Trying to become the leader."}
{"level":"error","ts":1562927855.7130342,"logger":"k8sutil","msg":"Failed to get Pod","Pod.Namespace":"1-7-4","Pod.Name":"syndesis-operator-1-mp7fr","error":"pods \"syndesis-operator-1-mp7fr\" is forbidden: User \"system:serviceaccount:1-7-4:syndesis-operator\" cannot get pods in the namespace \"1-7-4\": no RBAC policy matched","stacktrace":"github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil.GetPod\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil/k8sutil.go:105\ngithub.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader.myOwnerRef\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:142\ngithub.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader.Become\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:67\nmain.main\n\t/go/src/github.com/syndesisio/syndesis/install/operator/cmd/syndesis-operator/main.go:70\nruntime.main\n\t/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/proc.go:198"}
{"level":"error","ts":1562927855.7132056,"logger":"cmd","msg":"","error":"pods \"syndesis-operator-1-mp7fr\" is forbidden: User \"system:serviceaccount:1-7-4:syndesis-operator\" cannot get pods in the namespace \"1-7-4\": no RBAC policy matched","stacktrace":"github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\nmain.main\n\t/go/src/github.com/syndesisio/syndesis/install/operator/cmd/syndesis-operator/main.go:72\nruntime.main\n\t/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/proc.go:198"}

[camel-k] unknown flag --repository

When installing fuse-online with this command ./install_ocp.sh install --camel-k, there is an error because kamel changes it's repository option to --maven-repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.