From 7bf771cf56956b23f4f51273b49ada874432b82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 20 Mar 2023 12:12:36 +0000 Subject: [PATCH 01/32] Add .vscode --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c44e1e7..bfba5c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ social_preview.png - +.vscode *~ From 1cedb80afe03832371befc56a0f353c7ca84233b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 20 Mar 2023 12:13:18 +0000 Subject: [PATCH 02/32] Add comments to build process --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6824aed..345dab1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN DEBIAN_FRONTEND=noninteractive \ wget http://www.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \ unzip vm370sixpack-1_3.zip && \ chown -R $USERNAME:$USERNAME /home/$USERNAME && \ + # Remove unwanted files apt purge -y wget unzip && \ rm -rf /var/lib/apt/lists/* vm370sixpack-1_3.zip From b79fb506f2945bc7c2e1204e5c3df26af58b29ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 20 Mar 2023 12:13:35 +0000 Subject: [PATCH 03/32] Expose only TCP for terminal connection --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 345dab1..ab56ed9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,6 @@ RUN DEBIAN_FRONTEND=noninteractive \ USER $USERNAME WORKDIR /home/$USERNAME -EXPOSE 3270 +EXPOSE 3270/TCP CMD ["hercules", "-f", "sixpack.conf"] From 3d3746a07cb0c43a9199fcac0ddb6a30f4fd83e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 20 Mar 2023 12:14:11 +0000 Subject: [PATCH 04/32] Enable DOS disks --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index ab56ed9..96d8625 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ RUN DEBIAN_FRONTEND=noninteractive \ cd /home/$USERNAME && \ wget http://www.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \ unzip vm370sixpack-1_3.zip && \ + # Enable CMS/DOS disks + sed -i 's/#06a0/06a0/' sixpack.conf && \ + sed -i 's/#07a0/07a0/' sixpack.conf && \ chown -R $USERNAME:$USERNAME /home/$USERNAME && \ # Remove unwanted files apt purge -y wget unzip && \ From 2c5814b5f867b6080a440639424486f1800715f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 20 Mar 2023 23:45:03 +0000 Subject: [PATCH 05/32] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 913c9cb..2754686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## current +- Enable DOS disks +- Expose only TCP for terminal connection +- Add comments to build process +- Avoid APT questions - Add a hercules non-privileged user ## 1.3 From 3be36075cb466070a3b16d5f712af5353382b5fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 22 Mar 2023 23:09:59 +0000 Subject: [PATCH 06/32] Add zip and Emacs temporary files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index bfba5c7..9bf5421 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ social_preview.png .vscode *~ +*# +*.zip From 3d4bf4cb23d9bd65a1cfab1f747eea98a1ac190b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 22 Jul 2023 23:39:48 +0100 Subject: [PATCH 07/32] Do not upgrade the base image because usrmerge breaks the build --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 96d8625..c9dad88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN DEBIAN_FRONTEND=noninteractive \ groupadd --gid $USER_GID $USERNAME && \ useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ apt update && \ - apt dist-upgrade -y && \ + # usrmerge is failing to install, so no upgrade on this step. + # apt upgrade -y && \ apt install -y --no-install-recommends hercules wget unzip && \ cd /home/$USERNAME && \ wget http://www.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \ From 78a3c9ed134e0be9bd7c43e9d76ecb01e02e4e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 22 Jul 2023 23:42:28 +0100 Subject: [PATCH 08/32] Enable web UI, logoff console user, move cleanup up --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9dad88..dba6122 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,17 +14,22 @@ RUN DEBIAN_FRONTEND=noninteractive \ cd /home/$USERNAME && \ wget http://www.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \ unzip vm370sixpack-1_3.zip && \ - # Enable CMS/DOS disks + # Remove unwanted files. + apt purge -y wget unzip && \ + rm -rf /var/lib/apt/lists/* vm370sixpack-1_3.zip WC3270 && \ + # Enable CMS/DOS disks. sed -i 's/#06a0/06a0/' sixpack.conf && \ sed -i 's/#07a0/07a0/' sixpack.conf && \ - chown -R $USERNAME:$USERNAME /home/$USERNAME && \ - # Remove unwanted files - apt purge -y wget unzip && \ - rm -rf /var/lib/apt/lists/* vm370sixpack-1_3.zip + # Enable web UI with the MAINT credentials + sed -i 's/#HTTPPORT 8081/HTTPPORT 8081 AUTH MAINT CPCMS/' sixpack.conf && \ + # Log off the OPERATOR user from the Hercules console + echo '/LOGOFF' >> hercules.rc && \ + chown -R $USERNAME:$USERNAME /home/$USERNAME USER $USERNAME WORKDIR /home/$USERNAME EXPOSE 3270/TCP +EXPOSE 8081/TCP CMD ["hercules", "-f", "sixpack.conf"] From aa7339b3dacbc444086df344feff6075a479602c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 23 Jul 2023 00:09:21 +0100 Subject: [PATCH 09/32] Update README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75331e2..c4d6b15 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Docker image for rbanffy/vm370 To run, use: ```shell -docker run -it -p 3270:3270 rbanffy/vm370 +docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 ``` -And connect your terminals to localhost on port 3278. +And connect your terminals to localhost on port 3278. To get to the web console, connect +to http://localhost:8081 using the credentials for the MAINT user (as published in the +Sixpack documentation). From 22c4fc04440cad81b583becc7eabcc5879d18f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 23 Jul 2023 19:34:22 +0100 Subject: [PATCH 10/32] Updates to CHANGELOG and README --- CHANGELOG.md | 3 +++ README.md | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2754686..1ac09e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## current +- Improved README +- LOGOFF the operator so it can be used from a 3270 +- Enable the web interface - Enable DOS disks - Expose only TCP for terminal connection - Add comments to build process diff --git a/README.md b/README.md index c4d6b15..f6c52ce 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,18 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/rbanffy/vm370.svg)](https://hub.docker.com/r/rbanffy/vm370/) [![GitHub](https://img.shields.io/github/license/rbanffy/vm370.svg)](https://github.com/rbanffy/vm370) -Docker image for rbanffy/vm370 +This repo contains the files needed to build the Docker image for rbanffy/vm370. ![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/vm370/screenshot.png) +## Building the image + +To build it: + +```shell +docker build -t vm370 . +``` + To run, use: ```shell From 73c9887ed07fec445028ee1be09228d4626beade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Thu, 27 Jul 2023 21:10:36 +0100 Subject: [PATCH 11/32] Added maintainer label --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index dba6122..466d090 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM debian:stable-slim +LABEL maintainer="Ricardo Bánffy " + ARG USERNAME=hercules ARG USER_UID=1000 ARG USER_GID=$USER_UID From bd46cd15b264df66345f5cfe9c776ea5cfcbe7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Thu, 27 Jul 2023 21:11:53 +0100 Subject: [PATCH 12/32] Add note on running from Docker Hub --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f6c52ce..68937b8 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,20 @@ To build it: docker build -t vm370 . ``` -To run, use: +To run the image you just built, use: ```shell -docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 +docker run -it -p 3270:3270 -p 8081:8081 vm370 ``` -And connect your terminals to localhost on port 3278. To get to the web console, connect -to http://localhost:8081 using the credentials for the MAINT user (as published in the -Sixpack documentation). +At this point, you can connect your terminals to localhost on port 3278. To +get to the web console, connect to http://localhost:8081 using the credentials +for the MAINT user (as published in the Sixpack documentation). + +## Running from Docker Hub + +To run this image without building it locally, use: + +```shell +docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 +``` From b8fe737c375dc5ccab9a829cdf112747991971f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Thu, 27 Jul 2023 23:46:41 +0100 Subject: [PATCH 13/32] Moving Debian to testing (which is stable enough) --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 466d090..4b34222 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stable-slim +FROM debian:testing-slim LABEL maintainer="Ricardo Bánffy " @@ -10,8 +10,7 @@ RUN DEBIAN_FRONTEND=noninteractive \ groupadd --gid $USER_GID $USERNAME && \ useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ apt update && \ - # usrmerge is failing to install, so no upgrade on this step. - # apt upgrade -y && \ + apt upgrade -y && \ apt install -y --no-install-recommends hercules wget unzip && \ cd /home/$USERNAME && \ wget http://www.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \ From 8035b438715cca395bf78532425173ccaf1bd25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 30 Jul 2023 19:02:20 +0100 Subject: [PATCH 14/32] Added note on Docker Swarm usage --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 68937b8..b80ec2d 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,22 @@ To run this image without building it locally, use: ```shell docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 ``` + +## Deploying it to a Docker Swarm + +This image is intended to run as a service on a cluster. To create a vm370 +service on your cluster, run: + +```shell +docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 +``` + +When the service is up and running, connecting a 3270 session to any node will +get you to the VM370 welcome screen. + +### A warning + +This functionality is not completely developed, however - there is no access +to the Hercules console (only 3270 terminals) and data is not persisted when +the workload is moved to a new node. Use it at your own peril (and, if you know +how, help improving it). From 7c711c2af201101f7f10a0be687d1394b25099e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 31 Jul 2023 11:22:44 +0100 Subject: [PATCH 15/32] Remove ^Ms --- README.md | 106 +++++++++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index b80ec2d..a827c18 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,53 @@ -# vm370 - -[![Docker Pulls](https://img.shields.io/docker/pulls/rbanffy/vm370.svg)](https://hub.docker.com/r/rbanffy/vm370/) -[![GitHub](https://img.shields.io/github/license/rbanffy/vm370.svg)](https://github.com/rbanffy/vm370) - -This repo contains the files needed to build the Docker image for rbanffy/vm370. - -![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/vm370/screenshot.png) - -## Building the image - -To build it: - -```shell -docker build -t vm370 . -``` - -To run the image you just built, use: - -```shell -docker run -it -p 3270:3270 -p 8081:8081 vm370 -``` - -At this point, you can connect your terminals to localhost on port 3278. To -get to the web console, connect to http://localhost:8081 using the credentials -for the MAINT user (as published in the Sixpack documentation). - -## Running from Docker Hub - -To run this image without building it locally, use: - -```shell -docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 -``` - -## Deploying it to a Docker Swarm - -This image is intended to run as a service on a cluster. To create a vm370 -service on your cluster, run: - -```shell -docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 -``` - -When the service is up and running, connecting a 3270 session to any node will -get you to the VM370 welcome screen. - -### A warning - -This functionality is not completely developed, however - there is no access -to the Hercules console (only 3270 terminals) and data is not persisted when -the workload is moved to a new node. Use it at your own peril (and, if you know -how, help improving it). +# vm370 + +[![Docker Pulls](https://img.shields.io/docker/pulls/rbanffy/vm370.svg)](https://hub.docker.com/r/rbanffy/vm370/) +[![GitHub](https://img.shields.io/github/license/rbanffy/vm370.svg)](https://github.com/rbanffy/vm370) + +This repo contains the files needed to build the Docker image for rbanffy/vm370. + +![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/vm370/screenshot.png) + +## Building the image + +To build it: + +```shell +docker build -t vm370 . +``` + +To run the image you just built, use: + +```shell +docker run -it -p 3270:3270 -p 8081:8081 vm370 +``` + +At this point, you can connect your terminals to localhost on port 3278. To +get to the web console, connect to http://localhost:8081 using the credentials +for the MAINT user (as published in the Sixpack documentation). + +## Running from Docker Hub + +To run this image without building it locally, use: + +```shell +docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 +``` + +## Deploying it to a Docker Swarm + +This image is intended to run as a service on a cluster. To create a vm370 +service on your cluster, run: + +```shell +docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 +``` + +When the service is up and running, connecting a 3270 session to any node will +get you to the VM370 welcome screen. + +### A warning + +This functionality is not completely developed, however - there is no access +to the Hercules console (only 3270 terminals) and data is not persisted when +the workload is moved to a new node. Use it at your own peril (and, if you know +how, help improving it). From 6485195966db7ce4d7180b65aef508d980a2cba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Mon, 31 Jul 2023 11:24:31 +0100 Subject: [PATCH 16/32] Tag docker image according to branch --- Makefile | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 74d3b9c..0a904c8 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,16 @@ SHELL = /bin/sh +BRANCH = $(shell git branch --show-current) + +ifeq ($(BRANCH),main) + IMAGE_TAG = stable +else ($(BRANCH),develop) + IMAGE_TAG = latest +else + IMAGE_TAG = $(BRANCH) +endif + define PRINT_HELP_PYSCRIPT import re, sys @@ -19,30 +29,30 @@ help: ## Displays this message. @python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) build: ## Builds the Docker images - docker build -t ${USER}/vm370:latest-amd64 --platform=linux/amd64 . - docker build -t ${USER}/vm370:latest-arm64 --platform=linux/arm64 . - docker build -t ${USER}/vm370:latest-armv6 --platform=linux/arm/v6 . - docker build -t ${USER}/vm370:latest-armv7 --platform=linux/arm/v7 . - docker build -t ${USER}/vm370:latest-s390x --platform=linux/s390x . - docker build -t ${USER}/vm370:latest-ppc64le --platform=linux/ppc64le . + docker build -t ${USER}/vm370:${IMAGE_TAG}-amd64 --platform=linux/amd64 . + docker build -t ${USER}/vm370:${IMAGE_TAG}-arm64 --platform=linux/arm64 . + docker build -t ${USER}/vm370:${IMAGE_TAG}-armv6 --platform=linux/arm/v6 . + docker build -t ${USER}/vm370:${IMAGE_TAG}-armv7 --platform=linux/arm/v7 . + docker build -t ${USER}/vm370:${IMAGE_TAG}-s390x --platform=linux/s390x . + docker build -t ${USER}/vm370:${IMAGE_TAG}-ppc64le --platform=linux/ppc64le . start: build ## Builds and starts the local arch Docker image docker start -d -p 3270:3270 vm370 upload_images: ## Uploads the docker images - docker image push ${USER}/vm370:latest-amd64 - docker image push ${USER}/vm370:latest-arm64 - docker image push ${USER}/vm370:latest-armv6 - docker image push ${USER}/vm370:latest-armv7 - docker image push ${USER}/vm370:latest-s390x - docker image push ${USER}/vm370:latest-ppc64le + docker image push ${USER}/vm370:${IMAGE_TAG}-amd64 + docker image push ${USER}/vm370:${IMAGE_TAG}-arm64 + docker image push ${USER}/vm370:${IMAGE_TAG}-armv6 + docker image push ${USER}/vm370:${IMAGE_TAG}-armv7 + docker image push ${USER}/vm370:${IMAGE_TAG}-s390x + docker image push ${USER}/vm370:${IMAGE_TAG}-ppc64le upload: upload_images ## Uploads the manifest - docker manifest create ${USER}/vm370:latest \ - --amend ${USER}/vm370:latest-amd64 \ - --amend ${USER}/vm370:latest-amd64 \ - --amend ${USER}/vm370:latest-armv6 \ - --amend ${USER}/vm370:latest-armv7 \ - --amend ${USER}/vm370:latest-s390x \ - --amend ${USER}/vm370:latest-ppc64le - docker manifest push ${USER}/vm370:latest + docker manifest create ${USER}/vm370:${IMAGE_TAG} \ + --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ + --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ + --amend ${USER}/vm370:${IMAGE_TAG}-armv6 \ + --amend ${USER}/vm370:${IMAGE_TAG}-armv7 \ + --amend ${USER}/vm370:${IMAGE_TAG}-s390x \ + --amend ${USER}/vm370:${IMAGE_TAG}-ppc64le + docker manifest push ${USER}/vm370:${IMAGE_TAG} From fe0f034780a46c54ef7db0a2dd41ba926ee5c400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:24:59 -0300 Subject: [PATCH 17/32] Fix tagging logic --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0a904c8..a1ac193 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ BRANCH = $(shell git branch --show-current) ifeq ($(BRANCH),main) IMAGE_TAG = stable -else ($(BRANCH),develop) +else ifeq ($(BRANCH),develop) IMAGE_TAG = latest else IMAGE_TAG = $(BRANCH) From 086c714995ce50d59420940f5399a8b7139eb721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:25:33 -0300 Subject: [PATCH 18/32] Add MIPS and i386 support, because it's Debian --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a1ac193..ef05008 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,10 @@ build: ## Builds the Docker images docker build -t ${USER}/vm370:${IMAGE_TAG}-arm64 --platform=linux/arm64 . docker build -t ${USER}/vm370:${IMAGE_TAG}-armv6 --platform=linux/arm/v6 . docker build -t ${USER}/vm370:${IMAGE_TAG}-armv7 --platform=linux/arm/v7 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-s390x --platform=linux/s390x . + docker build -t ${USER}/vm370:${IMAGE_TAG}-i386 --platform=linux/i386 . + docker build -t ${USER}/vm370:${IMAGE_TAG}-mips64le --platform=linux/mips64le . docker build -t ${USER}/vm370:${IMAGE_TAG}-ppc64le --platform=linux/ppc64le . + docker build -t ${USER}/vm370:${IMAGE_TAG}-s390x --platform=linux/s390x . start: build ## Builds and starts the local arch Docker image docker start -d -p 3270:3270 vm370 @@ -44,8 +46,10 @@ upload_images: ## Uploads the docker images docker image push ${USER}/vm370:${IMAGE_TAG}-arm64 docker image push ${USER}/vm370:${IMAGE_TAG}-armv6 docker image push ${USER}/vm370:${IMAGE_TAG}-armv7 - docker image push ${USER}/vm370:${IMAGE_TAG}-s390x + docker image push ${USER}/vm370:${IMAGE_TAG}-i386 + docker image push ${USER}/vm370:${IMAGE_TAG}-mips64le docker image push ${USER}/vm370:${IMAGE_TAG}-ppc64le + docker image push ${USER}/vm370:${IMAGE_TAG}-s390x upload: upload_images ## Uploads the manifest docker manifest create ${USER}/vm370:${IMAGE_TAG} \ @@ -53,6 +57,8 @@ upload: upload_images ## Uploads the manifest --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ --amend ${USER}/vm370:${IMAGE_TAG}-armv6 \ --amend ${USER}/vm370:${IMAGE_TAG}-armv7 \ - --amend ${USER}/vm370:${IMAGE_TAG}-s390x \ + --amend ${USER}/vm370:${IMAGE_TAG}-i386 \ + --amend ${USER}/vm370:${IMAGE_TAG}-mips64le \ --amend ${USER}/vm370:${IMAGE_TAG}-ppc64le + --amend ${USER}/vm370:${IMAGE_TAG}-s390x \ docker manifest push ${USER}/vm370:${IMAGE_TAG} From 0bb327a58be84b11f02493c27b0c54c10c417645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:27:58 -0300 Subject: [PATCH 19/32] Fix CRLF-isms --- README.md | 106 +++++++++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index a827c18..b80ec2d 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,53 @@ -# vm370 - -[![Docker Pulls](https://img.shields.io/docker/pulls/rbanffy/vm370.svg)](https://hub.docker.com/r/rbanffy/vm370/) -[![GitHub](https://img.shields.io/github/license/rbanffy/vm370.svg)](https://github.com/rbanffy/vm370) - -This repo contains the files needed to build the Docker image for rbanffy/vm370. - -![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/vm370/screenshot.png) - -## Building the image - -To build it: - -```shell -docker build -t vm370 . -``` - -To run the image you just built, use: - -```shell -docker run -it -p 3270:3270 -p 8081:8081 vm370 -``` - -At this point, you can connect your terminals to localhost on port 3278. To -get to the web console, connect to http://localhost:8081 using the credentials -for the MAINT user (as published in the Sixpack documentation). - -## Running from Docker Hub - -To run this image without building it locally, use: - -```shell -docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 -``` - -## Deploying it to a Docker Swarm - -This image is intended to run as a service on a cluster. To create a vm370 -service on your cluster, run: - -```shell -docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 -``` - -When the service is up and running, connecting a 3270 session to any node will -get you to the VM370 welcome screen. - -### A warning - -This functionality is not completely developed, however - there is no access -to the Hercules console (only 3270 terminals) and data is not persisted when -the workload is moved to a new node. Use it at your own peril (and, if you know -how, help improving it). +# vm370 + +[![Docker Pulls](https://img.shields.io/docker/pulls/rbanffy/vm370.svg)](https://hub.docker.com/r/rbanffy/vm370/) +[![GitHub](https://img.shields.io/github/license/rbanffy/vm370.svg)](https://github.com/rbanffy/vm370) + +This repo contains the files needed to build the Docker image for rbanffy/vm370. + +![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/vm370/screenshot.png) + +## Building the image + +To build it: + +```shell +docker build -t vm370 . +``` + +To run the image you just built, use: + +```shell +docker run -it -p 3270:3270 -p 8081:8081 vm370 +``` + +At this point, you can connect your terminals to localhost on port 3278. To +get to the web console, connect to http://localhost:8081 using the credentials +for the MAINT user (as published in the Sixpack documentation). + +## Running from Docker Hub + +To run this image without building it locally, use: + +```shell +docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 +``` + +## Deploying it to a Docker Swarm + +This image is intended to run as a service on a cluster. To create a vm370 +service on your cluster, run: + +```shell +docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 +``` + +When the service is up and running, connecting a 3270 session to any node will +get you to the VM370 welcome screen. + +### A warning + +This functionality is not completely developed, however - there is no access +to the Hercules console (only 3270 terminals) and data is not persisted when +the workload is moved to a new node. Use it at your own peril (and, if you know +how, help improving it). From b04f573da9053f9708dd2de426ef35cb2a965252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:35:50 -0300 Subject: [PATCH 20/32] Remove start target --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index ef05008..dae81ad 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,6 @@ build: ## Builds the Docker images docker build -t ${USER}/vm370:${IMAGE_TAG}-ppc64le --platform=linux/ppc64le . docker build -t ${USER}/vm370:${IMAGE_TAG}-s390x --platform=linux/s390x . -start: build ## Builds and starts the local arch Docker image - docker start -d -p 3270:3270 vm370 - upload_images: ## Uploads the docker images docker image push ${USER}/vm370:${IMAGE_TAG}-amd64 docker image push ${USER}/vm370:${IMAGE_TAG}-arm64 From 2a57720796a6799a633415b76db4b1a80bb7099b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:36:39 -0300 Subject: [PATCH 21/32] Fix manifest upload --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dae81ad..30b654a 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,6 @@ upload: upload_images ## Uploads the manifest --amend ${USER}/vm370:${IMAGE_TAG}-armv7 \ --amend ${USER}/vm370:${IMAGE_TAG}-i386 \ --amend ${USER}/vm370:${IMAGE_TAG}-mips64le \ - --amend ${USER}/vm370:${IMAGE_TAG}-ppc64le - --amend ${USER}/vm370:${IMAGE_TAG}-s390x \ + --amend ${USER}/vm370:${IMAGE_TAG}-ppc64le \ + --amend ${USER}/vm370:${IMAGE_TAG}-s390x docker manifest push ${USER}/vm370:${IMAGE_TAG} From a4d7e0c63d4388f78675783414f6d496da6e614e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Wed, 2 Aug 2023 20:37:41 -0300 Subject: [PATCH 22/32] Fix erroneous manifest --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30b654a..4c471da 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ upload_images: ## Uploads the docker images upload: upload_images ## Uploads the manifest docker manifest create ${USER}/vm370:${IMAGE_TAG} \ --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ - --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ + --amend ${USER}/vm370:${IMAGE_TAG}-arm64 \ --amend ${USER}/vm370:${IMAGE_TAG}-armv6 \ --amend ${USER}/vm370:${IMAGE_TAG}-armv7 \ --amend ${USER}/vm370:${IMAGE_TAG}-i386 \ From 163e233110dff953b79274474a41a8bf3ad38d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Fri, 1 Sep 2023 21:48:13 +0100 Subject: [PATCH 23/32] Prepare for multi-OS builds --- Dockerfile => Dockerfile-vm370 | 0 Makefile | 59 ++++++++++++++-------------------- 2 files changed, 24 insertions(+), 35 deletions(-) rename Dockerfile => Dockerfile-vm370 (100%) diff --git a/Dockerfile b/Dockerfile-vm370 similarity index 100% rename from Dockerfile rename to Dockerfile-vm370 diff --git a/Makefile b/Makefile index 4c471da..52e1892 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,7 @@ SHELL = /bin/sh -BRANCH = $(shell git branch --show-current) - -ifeq ($(BRANCH),main) - IMAGE_TAG = stable -else ifeq ($(BRANCH),develop) - IMAGE_TAG = latest -else - IMAGE_TAG = $(BRANCH) -endif +OPERATING_SYSTEM = vm370 define PRINT_HELP_PYSCRIPT import re, sys @@ -29,33 +21,30 @@ help: ## Displays this message. @python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) build: ## Builds the Docker images - docker build -t ${USER}/vm370:${IMAGE_TAG}-amd64 --platform=linux/amd64 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-arm64 --platform=linux/arm64 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-armv6 --platform=linux/arm/v6 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-armv7 --platform=linux/arm/v7 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-i386 --platform=linux/i386 . - docker build -t ${USER}/vm370:${IMAGE_TAG}-mips64le --platform=linux/mips64le . - docker build -t ${USER}/vm370:${IMAGE_TAG}-ppc64le --platform=linux/ppc64le . - docker build -t ${USER}/vm370:${IMAGE_TAG}-s390x --platform=linux/s390x . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-amd64 --platform=linux/amd64 --file Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-arm64 --platform=linux/arm64 --file ./Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-armv6 --platform=linux/arm/v6 --file ./Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-armv7 --platform=linux/arm/v7 --file ./Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-s390x --platform=linux/s390x --file ./Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-ppc64le --platform=linux/ppc64le --file ./Dockerfile-${OPERATING_SYSTEM} . + +start: build ## Builds and starts the local arch Docker image + docker start -d -p 3270:3270 vm370 upload_images: ## Uploads the docker images - docker image push ${USER}/vm370:${IMAGE_TAG}-amd64 - docker image push ${USER}/vm370:${IMAGE_TAG}-arm64 - docker image push ${USER}/vm370:${IMAGE_TAG}-armv6 - docker image push ${USER}/vm370:${IMAGE_TAG}-armv7 - docker image push ${USER}/vm370:${IMAGE_TAG}-i386 - docker image push ${USER}/vm370:${IMAGE_TAG}-mips64le - docker image push ${USER}/vm370:${IMAGE_TAG}-ppc64le - docker image push ${USER}/vm370:${IMAGE_TAG}-s390x + docker image push ${USER}/${OPERATING_SYSTEM}:latest-amd64 + docker image push ${USER}/${OPERATING_SYSTEM}:latest-arm64 + docker image push ${USER}/${OPERATING_SYSTEM}:latest-armv6 + docker image push ${USER}/${OPERATING_SYSTEM}:latest-armv7 + docker image push ${USER}/${OPERATING_SYSTEM}:latest-s390x + docker image push ${USER}/${OPERATING_SYSTEM}:latest-ppc64le upload: upload_images ## Uploads the manifest - docker manifest create ${USER}/vm370:${IMAGE_TAG} \ - --amend ${USER}/vm370:${IMAGE_TAG}-amd64 \ - --amend ${USER}/vm370:${IMAGE_TAG}-arm64 \ - --amend ${USER}/vm370:${IMAGE_TAG}-armv6 \ - --amend ${USER}/vm370:${IMAGE_TAG}-armv7 \ - --amend ${USER}/vm370:${IMAGE_TAG}-i386 \ - --amend ${USER}/vm370:${IMAGE_TAG}-mips64le \ - --amend ${USER}/vm370:${IMAGE_TAG}-ppc64le \ - --amend ${USER}/vm370:${IMAGE_TAG}-s390x - docker manifest push ${USER}/vm370:${IMAGE_TAG} + docker manifest create ${USER}/${OPERATING_SYSTEM}:latest \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-amd64 \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-amd64 \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-armv6 \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-armv7 \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-s390x \ + --amend ${USER}/${OPERATING_SYSTEM}:latest-ppc64le + docker manifest push ${USER}/${OPERATING_SYSTEM}:latest From a7ed4d3151452cc247d76bde83e006fac4959ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Fri, 1 Sep 2023 22:02:09 +0100 Subject: [PATCH 24/32] Override correctly --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 52e1892..191cfbe 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ SHELL = /bin/sh -OPERATING_SYSTEM = vm370 +OPERATING_SYSTEM ?= vm370 define PRINT_HELP_PYSCRIPT import re, sys From 73232df5d5ca68c96e8fd43817d1800900134b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Fri, 1 Sep 2023 23:19:56 +0100 Subject: [PATCH 25/32] Add support for VM370 Community Edition --- Dockerfile-vm370ce | 34 ++++++++++++++++++++++++++++++++++ README.md | 26 +++++++++++++++++--------- 2 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 Dockerfile-vm370ce diff --git a/Dockerfile-vm370ce b/Dockerfile-vm370ce new file mode 100644 index 0000000..0345d7f --- /dev/null +++ b/Dockerfile-vm370ce @@ -0,0 +1,34 @@ +FROM debian:testing-slim + +LABEL maintainer="Ricardo Bánffy " + +ARG USERNAME=hercules +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN DEBIAN_FRONTEND=noninteractive \ + groupadd --gid $USER_GID $USERNAME && \ + useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ + apt update && \ + apt upgrade -y && \ + apt install -y --no-install-recommends hercules wget unzip && \ + cd /home/$USERNAME && \ + wget http://www.vm370.org/sites/default/files/2022-07/VM370CE.V1.R1.2.zip && \ + unzip VM370CE.V1.R1.2.zip && \ + mv VM370CE.V1.R1.2/* . && \ + # Remove unwanted files. + apt purge -y wget unzip && \ + rm -rf /var/lib/apt/lists/* VM370CE.V1.R1.2.zip WC3270 && \ + # Enable web UI with the MAINT credentials + sed -i 's/#HTTPPORT 8081/HTTPPORT 8081 AUTH MAINT CPCMS/' vm370ce.conf && \ + # Log off the OPERATOR user from the Hercules console + echo '/LOGOFF' >> hercules.rc && \ + chown -R $USERNAME:$USERNAME /home/$USERNAME + +USER $USERNAME +WORKDIR /home/$USERNAME + +EXPOSE 3270/TCP +EXPOSE 8081/TCP + +CMD ["hercules", "-f", "vm370ce.conf"] diff --git a/README.md b/README.md index b80ec2d..37ab6d9 100644 --- a/README.md +++ b/README.md @@ -9,25 +9,34 @@ This repo contains the files needed to build the Docker image for rbanffy/vm370. ## Building the image -To build it: +By default, we'll build the VM370 Six Pack image. To build it, run: ```shell docker build -t vm370 . ``` -To run the image you just built, use: +To run the image you just built on an amd64 computer, use: ```shell -docker run -it -p 3270:3270 -p 8081:8081 vm370 +docker run -it -p 3270:3270 -p 8081:8081 $USER/vm370:latest-amd64 ``` At this point, you can connect your terminals to localhost on port 3278. To get to the web console, connect to http://localhost:8081 using the credentials for the MAINT user (as published in the Sixpack documentation). +## Building an image with other OSs + +By default we'll build based on Dockerfile-vm370. To select other Dockerfiles, +set the variable OPERATING_SYSTEM. + +```shell +OPERATING_SYSTEM=vm370ce make build +``` + ## Running from Docker Hub -To run this image without building it locally, use: +To run the VM370 Six Pack image without building it locally, use: ```shell docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 @@ -39,7 +48,7 @@ This image is intended to run as a service on a cluster. To create a vm370 service on your cluster, run: ```shell -docker service create --name vm370 --publish 3270:3270 rbanffy/vm370 +docker service create --name vm370 --publish 3270:3270 --publish 8081:8081 rbanffy/vm370 ``` When the service is up and running, connecting a 3270 session to any node will @@ -47,7 +56,6 @@ get you to the VM370 welcome screen. ### A warning -This functionality is not completely developed, however - there is no access -to the Hercules console (only 3270 terminals) and data is not persisted when -the workload is moved to a new node. Use it at your own peril (and, if you know -how, help improving it). +The web-based Hercules console is not working properly at the moment. Also +data is not persisted when the workload is moved to a new node. Use it at +your own peril (and, if you know how, help improving it). From 7ce85dcad6489ca9cb83cc23210f6bb7c23cea51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 2 Sep 2023 00:01:48 +0100 Subject: [PATCH 26/32] Enable DOS/VS devices --- Dockerfile-vm370ce | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile-vm370ce b/Dockerfile-vm370ce index 0345d7f..a11156a 100644 --- a/Dockerfile-vm370ce +++ b/Dockerfile-vm370ce @@ -14,11 +14,19 @@ RUN DEBIAN_FRONTEND=noninteractive \ apt install -y --no-install-recommends hercules wget unzip && \ cd /home/$USERNAME && \ wget http://www.vm370.org/sites/default/files/2022-07/VM370CE.V1.R1.2.zip && \ - unzip VM370CE.V1.R1.2.zip && \ + wget http://dosvs.31bits.net/DOSVS_5Pack_V1.0-full.zip && \ + unzip VM370CE.V1.R1.2.zip && \ mv VM370CE.V1.R1.2/* . && \ + unzip DOSVS_5Pack_V1.0-full.zip -d disks && \ + # Enable DOS/VS devices. + sed -i 's/#0361/0361/' vm370ce.conf && \ + sed -i 's/#0362/0362/' vm370ce.conf && \ + sed -i 's/#0363/0363/' vm370ce.conf && \ + sed -i 's/#0364/0364/' vm370ce.conf && \ # Remove unwanted files. apt purge -y wget unzip && \ - rm -rf /var/lib/apt/lists/* VM370CE.V1.R1.2.zip WC3270 && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf VM370CE.V1.R1.2.zip WC3270 VM370CE.V1.R1.2 DOSVS_5Pack_V1.0-full.zip && \ # Enable web UI with the MAINT credentials sed -i 's/#HTTPPORT 8081/HTTPPORT 8081 AUTH MAINT CPCMS/' vm370ce.conf && \ # Log off the OPERATOR user from the Hercules console From 25d547b297fcb2de21e5c0f39b49509cfc863eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 2 Sep 2023 17:07:43 +0100 Subject: [PATCH 27/32] Initial MVS Tk4 support --- Dockerfile-mvstk4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Dockerfile-mvstk4 diff --git a/Dockerfile-mvstk4 b/Dockerfile-mvstk4 new file mode 100644 index 0000000..8bf24d9 --- /dev/null +++ b/Dockerfile-mvstk4 @@ -0,0 +1,33 @@ +FROM debian:testing-slim + +LABEL maintainer="Ricardo Bánffy " + +ARG USERNAME=hercules +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN DEBIAN_FRONTEND=noninteractive \ + groupadd --gid $USER_GID $USERNAME && \ + useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ + apt update && \ + apt upgrade -y && \ + apt install -y --no-install-recommends hercules wget unzip && \ + cd /home/$USERNAME && \ + wget --no-check-certificate https://wotho.ethz.ch/tk4-/tk4-_v1.00_current.zip && \ + wget --no-check-certificate https://wotho.ethz.ch/tk4-/tk4-cbt.zip && \ + wget --no-check-certificate https://wotho.ethz.ch/tk4-/tk4-source.zip && \ + unzip tk4-_v1.00_current.zip && \ + unzip -o tk4-cbt.zip && \ + unzip -o tk4-source.zip && \ + # Remove unwanted files. + apt purge -y wget unzip && \ + rm -rf /var/lib/apt/lists/* *.zip && \ + chown -R $USERNAME:$USERNAME /home/$USERNAME + +USER $USERNAME +WORKDIR /home/$USERNAME + +EXPOSE 3270/TCP +EXPOSE 8081/TCP + +CMD [$WORKDIR, "start_herc"] From d171de62024199c0c4d34230d0c42734fe5e1866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 3 Sep 2023 12:16:22 +0100 Subject: [PATCH 28/32] Remove trailing whitespace --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 191cfbe..d378520 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ build: ## Builds the Docker images docker build -t ${USER}/${OPERATING_SYSTEM}:latest-arm64 --platform=linux/arm64 --file ./Dockerfile-${OPERATING_SYSTEM} . docker build -t ${USER}/${OPERATING_SYSTEM}:latest-armv6 --platform=linux/arm/v6 --file ./Dockerfile-${OPERATING_SYSTEM} . docker build -t ${USER}/${OPERATING_SYSTEM}:latest-armv7 --platform=linux/arm/v7 --file ./Dockerfile-${OPERATING_SYSTEM} . - docker build -t ${USER}/${OPERATING_SYSTEM}:latest-s390x --platform=linux/s390x --file ./Dockerfile-${OPERATING_SYSTEM} . + docker build -t ${USER}/${OPERATING_SYSTEM}:latest-s390x --platform=linux/s390x --file ./Dockerfile-${OPERATING_SYSTEM} . docker build -t ${USER}/${OPERATING_SYSTEM}:latest-ppc64le --platform=linux/ppc64le --file ./Dockerfile-${OPERATING_SYSTEM} . start: build ## Builds and starts the local arch Docker image From d0678b23ae4a32f63975c8d507a6038966687ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 3 Sep 2023 12:17:06 +0100 Subject: [PATCH 29/32] Use `mvs` startup script --- Dockerfile-mvstk4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile-mvstk4 b/Dockerfile-mvstk4 index 8bf24d9..1780717 100644 --- a/Dockerfile-mvstk4 +++ b/Dockerfile-mvstk4 @@ -28,6 +28,6 @@ USER $USERNAME WORKDIR /home/$USERNAME EXPOSE 3270/TCP -EXPOSE 8081/TCP +EXPOSE 8038/TCP -CMD [$WORKDIR, "start_herc"] +CMD ["./mvs"] \ No newline at end of file From 577a7556cc71842287ddb66e5e06fa2639c83b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sun, 3 Sep 2023 21:58:04 +0100 Subject: [PATCH 30/32] Improve README update CHANGELOG --- CHANGELOG.md | 1 + README.md | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ac09e6..a77ba0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## current +- Added Dockerfiles for VM370 Community Edition and MVS Tk4- - Improved README - LOGOFF the operator so it can be used from a 3270 - Enable the web interface diff --git a/README.md b/README.md index 37ab6d9..426d9f8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ for the MAINT user (as published in the Sixpack documentation). ## Building an image with other OSs -By default we'll build based on Dockerfile-vm370. To select other Dockerfiles, +By default we'll build based on Dockerfile-vm370. To select other Dockerfiles, set the variable OPERATING_SYSTEM. ```shell @@ -42,6 +42,12 @@ To run the VM370 Six Pack image without building it locally, use: docker run -it -p 3270:3270 -p 8081:8081 rbanffy/vm370 ``` +MVS Tk4- uses port 8038 for the web console: + +```shell +docker run -it -p 3270:3270 -p 8038:8038 rbanffy/mvstk4 +``` + ## Deploying it to a Docker Swarm This image is intended to run as a service on a cluster. To create a vm370 @@ -56,6 +62,9 @@ get you to the VM370 welcome screen. ### A warning -The web-based Hercules console is not working properly at the moment. Also -data is not persisted when the workload is moved to a new node. Use it at -your own peril (and, if you know how, help improving it). +The web-based Hercules console is not working properly for the VM370 images at +the moment, but work correctly with MVS 3.8 Tk4- on port 8038. + +A more serious issue is that data is not persisted beyond the life of the +container, or when the workload is moved to a new node. Use it at your own +peril (and, if you know how, help improving it). From 94f321fbfd5a6bd678f4ce19d5ab83558d5ab1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 7 Oct 2023 13:58:50 +0100 Subject: [PATCH 31/32] Bump version to 1.4 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a77ba0e..a29bd44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## current +## 1.4 - Added Dockerfiles for VM370 Community Edition and MVS Tk4- - Improved README From 9ad96e21ab47a28bca28b12f04120b7b73518308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20B=C3=A1nffy?= Date: Sat, 7 Oct 2023 14:48:58 +0100 Subject: [PATCH 32/32] Update shiftleft-analysis.yml Branch master was renamed to main --- .github/workflows/shiftleft-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shiftleft-analysis.yml b/.github/workflows/shiftleft-analysis.yml index 080553b..d5b12aa 100644 --- a/.github/workflows/shiftleft-analysis.yml +++ b/.github/workflows/shiftleft-analysis.yml @@ -10,10 +10,10 @@ name: SL Scan on: push: - branches: [ master, develop ] + branches: [ main, develop ] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [ main ] schedule: - cron: '45 17 * * 1'