Skip to content

Commit

Permalink
IBM Wazi Developer for Workspaces v1.4.0
Browse files Browse the repository at this point in the history
IBM Wazi Developer for Workspaces v1.4.0
  • Loading branch information
ArvinB committed Oct 28, 2021
1 parent 214cdfa commit d74368e
Show file tree
Hide file tree
Showing 2,714 changed files with 950,065 additions and 5,087 deletions.
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

95 changes: 26 additions & 69 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,78 +1,35 @@
# Temporary Build Files
build/_output
build/_test
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
projectile-bookmarks.eld
# directory configuration
.dir-locals.el
# saveplace
places
# url cache
url/cache/
# cedet
ede-projects.el
# smex
smex-items
# company-statistics
company-statistics-cache.el
# anaconda-mode
anaconda-mode/
### Go ###

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with 'go test -c'
bin

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags
### VisualStudioCode ###
.vscode/*
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
**/.DS_Store

# Kubernetes Generated files - skip generated files, except for vendored files
generated/
!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
*.swp
*.swo
*~

# Manual adds
.DS_Store
.vscode/settings.json
#vendor/**

# Generated versions.txt for bundles
build/install/versions.txt

# Credentials in env files
build/scripts/.env
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ services:
env:
global:
- IMAGE="docker.io/ibmcom/wazi-code-operator-catalog"
install: docker build -t ${IMAGE}:travis .
# docker build -t ${IMAGE}:travis .
install: docker version
script: echo "Success!"
notifications:
slack: ibm-systems-z:kiD2FZtJUJtUSp57dwHWwNX1
121 changes: 54 additions & 67 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,76 +1,63 @@
#
# Copyright IBM Corporation 2020 - 2021
# Copyright (c) 2018-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBM Corporation - implementation
# Red Hat, Inc. - initial API and implementation
#

FROM quay.io/operator-framework/upstream-registry-builder:v1.15.3 as builder

COPY manifests manifests/
COPY metadata metadata/
RUN ./bin/initializer --permissive true -o ./bundles.db

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

# Build Arguments
ARG PRODUCT_VERSION=1.2.5

ENV PRODUCT="IBM Wazi Developer for Red Hat CodeReady Workspaces" \
COMPANY="IBM" \
VERSION=$PRODUCT_VERSION \
RELEASE="1" \
SUMMARY="IBM Wazi Developer for Workspaces" \
DESCRIPTION="IBM Wazi Developer for Red Hat CodeReady Workspaces - Operator" \
PRODNAME="wazi-codeready-workspaces" \
COMPNAME="wazi-codeready-operator" \
PRODTAG="wazi-code-operator-catalog"

LABEL name="$PRODUCT" \
vendor="$COMPANY" \
version="$VERSION" \
release="$RELEASE" \
license="EPLv2" \
summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="$SUMMARY" \
io.openshift.tags="$PRODNAME,$COMPNAME,$PRODTAG,$COMPANY" \
com.redhat.component="$PRODTAG" \
io.openshift.expose-services="" \
usage="" \
productName="$PRODUCT" \
productVersion="$VERSION" \
operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \
operators.operatorframework.io.bundle.manifests.v1=manifests/ \
operators.operatorframework.io.bundle.metadata.v1=metadata/ \
operators.operatorframework.io.bundle.package.v1=wazi-codeready-operator \
operators.operatorframework.io.bundle.channels.v1=v1.2-wazi,v1.2-idzee,previous \
operators.operatorframework.io.bundle.channel.default.v1=v1.2-wazi

RUN microdnf update -y && \
microdnf clean all && \
rm -rf /var/cache/yum && \
mkdir /registry

WORKDIR /registry

RUN chgrp -R 0 /registry && \
chmod -R g+rwx /registry

COPY LICENSE /licenses/
COPY --from=builder bundles.db /bundles.db
COPY --from=builder /bin/registry-server /bin/registry-server
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe

USER 1001

EXPOSE 50051

ENTRYPOINT ["/bin/registry-server"]
CMD ["--database", "/bundles.db", "--termination-log=log.txt"]
# NOTE: using registry.access.redhat.com/rhel8/go-toolset does not work (user is requested to use registry.redhat.io)
# NOTE: using registry.redhat.io/rhel8/go-toolset requires login, which complicates automation
# NOTE: since updateBaseImages.sh does not support other registries than RHCC, update to RHEL8
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/devtools/go-toolset-rhel7
FROM registry.access.redhat.com/devtools/go-toolset-rhel7:1.13.15-4 as builder
ENV PATH=/opt/rh/go-toolset-1.13/root/usr/bin:${PATH} \
GOPATH=/go/

ARG DEV_WORKSPACE_CONTROLLER_VERSION="0.4.x"
ARG DEV_WORKSPACE_CHE_OPERATOR_VERSION="7.30.x"

USER root
ADD . /che-operator
WORKDIR /che-operator

# build operator
RUN export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; elif [[ ${ARCH} == "aarch64" ]]; then export ARCH="arm64"; fi && \
export MOCK_API=true && \
go test -mod=vendor -v ./... && \
GOOS=linux GOARCH=${ARCH} CGO_ENABLED=0 go build -mod=vendor -o /tmp/che-operator/che-operator cmd/manager/main.go

# upstream, download devworkspace-operator templates for every build
# downstream, copy prefetched zip into /tmp
RUN curl -L https://api.github.com/repos/devfile/devworkspace-operator/zipball/${DEV_WORKSPACE_CONTROLLER_VERSION} > /tmp/devworkspace-operator.zip && \
unzip /tmp/devworkspace-operator.zip */deploy/deployment/* -d /tmp && \
mkdir -p /tmp/devworkspace-operator/templates/ && \
mv /tmp/devfile-devworkspace-operator-*/deploy /tmp/devworkspace-operator/templates/

# upstream, download devworkspace-che-operator templates for every build
# downstream, copy prefetched zip into /tmp
RUN curl -L https://api.github.com/repos/che-incubator/devworkspace-che-operator/zipball/${DEV_WORKSPACE_CHE_OPERATOR_VERSION} > /tmp/devworkspace-che-operator.zip && \
unzip /tmp/devworkspace-che-operator.zip */deploy/deployment/* -d /tmp && \
mkdir -p /tmp/devworkspace-che-operator/templates/ && \
mv /tmp/che-incubator-devworkspace-che-operator-*/deploy /tmp/devworkspace-che-operator/templates/

# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.4-200

COPY --from=builder /tmp/che-operator/che-operator /usr/local/bin/che-operator
COPY --from=builder /che-operator/templates/keycloak-provision.sh /tmp/keycloak-provision.sh
COPY --from=builder /che-operator/templates/keycloak-update.sh /tmp/keycloak-update.sh
COPY --from=builder /che-operator/templates/oauth-provision.sh /tmp/oauth-provision.sh
COPY --from=builder /che-operator/templates/delete-identity-provider.sh /tmp/delete-identity-provider.sh
COPY --from=builder /che-operator/templates/create-github-identity-provider.sh /tmp/create-github-identity-provider.sh
COPY --from=builder /tmp/devworkspace-operator/templates/deploy /tmp/devworkspace-operator/templates
COPY --from=builder /tmp/devworkspace-che-operator/templates/deploy /tmp/devworkspace-che-operator/templates

# install httpd-tools for /usr/bin/htpasswd
RUN microdnf install -y httpd-tools && microdnf -y update && microdnf -y clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages"
CMD ["che-operator"]

# append Brew metadata here - see https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/crw-jenkins/jobs/CRW_CI/crw-operator_2.x.jenkinsfile
70 changes: 68 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ IBM Wazi Developer for Workspaces, a component of IBM Wazi Developer, is built o

IBM Wazi Developer for Workspaces provides a modern experience for mainframe software developers working with z/OS applications in the cloud. Powered by the open-source projects Zowe and Red Hat CodeReady Workspaces, IBM Wazi Developer for Workspaces offers an easy, streamlined onboarding process to provide mainframe developers the tools they need. Using container technology and stacks, IBM Wazi Developer for Workspaces brings the necessary technology to the task at hand.

### Details
## Details

IBM Wazi Developer for Workspaces provides a custom stack for mainframe developers with the all-in-one mainframe development package that includes the following capabilities:

- Modern mainframe editor with rich language support for COBOL, JCL, Assembler (HLASM), and PL/I, which provides language-specific features such as syntax highlighting, outline view, declaration hovering, code completion, snippets, a preview of copybooks, copybook navigation, and basic refactoring using [IBM Z Open Editor](https://marketplace.visualstudio.com/items?itemName=IBM.zopeneditor)
Expand All @@ -42,9 +43,74 @@ IBM Wazi Developer for Workspaces provides a custom stack for mainframe develope
- Debugging COBOL and PL/I applications using [IBM Z Open Debug](https://developer.ibm.com/mainframe/2020/06/12/introducing-ibm-z-open-debug/)
- Mainframe Development package with a custom plug-in and devfile registry support using the [IBM Wazi Developer stack](https://github.com/IBM/wazi-codeready-workspaces)

### Prerequisites
Read our official documentation on the [IBM Documentation](https://ibm.biz/wazi-crw-doc) site to learn more about IBM Wazi Developer.

## Prerequisites

### Resources Required

- Ensure that you have a connection to a Red Hat OpenShift Container Platform (OCP) cluster, and that you have cluster-admin permissions.
- The Red Hat OpenShift cluster must be configured with a default storage class. For more information, see OpenShift Container Platform documentation.
- If you plan to use the OpenShift oAuth, then the cluster oAuth must be configured. For more information, see Configuring the internal OAuth server.
- Install OpenShift command-line tool, which lets you create applications and manage OpenShift Container Platform projects from a terminal.
- Install IBM Cloud Pak® command-line tool, which is a command line tool to manage Container Application Software for Enterprises (CASEs).

---

**_Red Hat Content_**

## Building CRW Operator and Metadata containers

### Operator container

* The CRW operator has most of code in the upstream [che-operator](https://github.com/eclipse-che/che-operator/) repo, including this [Dockerfile](https://github.com/eclipse-che/che-operator/blob/master/Dockerfile).

* This code is then synced to the [downstream repo](http://pkgs.devel.redhat.com/cgit/containers/codeready-workspaces-operator/?h=crw-2-rhel-8) via a job located here:

- https://main-jenkins-csb-crwqe.apps.ocp4.prod.psi.redhat.com/job/CRW_CI/ (jobs)
- https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/tree/master/jobs/CRW_CI (sources)
- https://github.com/redhat-developer/codeready-workspaces-images#jenkins-jobs (copied sources)

The Jenkinsfile transforms the Che code into CRW code and commits the changed code directly to downstream so there's no need for a branch in che-operator or to have code duplicated here.

NOTE: The job can be configured to sync from any upstream che-operator branch, eg., `SOURCE_BRANCH` = `7.26.x` or `master`.

* Once the sync is done:

** the [codeready-workspaces-operator](http://pkgs.devel.redhat.com/cgit/containers/codeready-workspaces-operator/?h=crw-2-rhel-8) repo is updated;

** a Brew build will be triggered via **get-sources-rhpkg-container-build** job

** and, if successful, the Brew build will be copied to Quay as `https://quay.io/crw/crw-2-rhel8-operator`.

### Metadata container

* Metadata for the CRW operator is contained in this repo. See [manifests](https://github.com/redhat-developer/codeready-workspaces-operator/tree/master/manifests), [metadata](https://github.com/redhat-developer/codeready-workspaces-operator/tree/master/metadata) and [deploy](https://github.com/redhat-developer/codeready-workspaces-operator/tree/master/deploy) folders, and this [operator-metadata.Dockerfile](https://github.com/redhat-developer/codeready-workspaces-operator/blob/master/operator-metadata.Dockerfile).

* The metadata is then synced to the [downstream repo](http://pkgs.devel.redhat.com/cgit/containers/codeready-workspaces-operator-metadata/?h=crw-2-rhel-8) via a job located here:

- https://main-jenkins-csb-crwqe.apps.ocp4.prod.psi.redhat.com/job/CRW_CI/ (jobs)
- https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/tree/master/jobs/CRW_CI (sources)
- https://github.com/redhat-developer/codeready-workspaces-images#jenkins-jobs (copied sources)

NOTE: The job can be configured to sync from any upstream che-operator branch, eg., `SOURCE_BRANCH` = `7.26.x` or `master`.

* Once the sync is done:

** the [codeready-workspaces-operator-metadata](http://pkgs.devel.redhat.com/cgit/containers/codeready-workspaces-operator-metadata/?h=crw-2-rhel-8) repo is updated;

** a Brew build will be triggered via **get-sources-rhpkg-container-build** job

** and, if successful, the Brew build will be copied to Quay] as `https://quay.io/crw/crw-2-rhel8-operator-metadata`.

### crwctl CLI binary

* Once the operator and metadata is rebuilt, a new build of [crwctl](https://github.com/redhat-developer/codeready-workspaces-chectl) is triggered.

* This is triggered because the CRW operator-metadata's [deploy folder](https://github.com/redhat-developer/codeready-workspaces-operator/tree/master/deploy) is used in crwctl to do deployment when there is no OLM present on the target cluster (OCP 3.11 and 4.1).

See crwctl job located here:

- https://main-jenkins-csb-crwqe.apps.ocp4.prod.psi.redhat.com/job/CRW_CI/ (jobs)
- https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/tree/master/jobs/CRW_CI (sources)
- https://github.com/redhat-developer/codeready-workspaces-images#jenkins-jobs (copied sources)
Loading

0 comments on commit d74368e

Please sign in to comment.