PreprintPDF Available

InstallationofEclipseCodewindandDockerComposeonRHEL8LinuxV2

Authors:
  • ASB Software Development Limited
Preprints and early-stage research may not have been peer reviewed yet.

Abstract

This document describes the step by step installation of the archived Eclipse Codewind plugin and Docker Compose Container development, including test examples, using the latest Eclipse Version: 2022-09 (4.25.0), installed on the Linux ProxyNode cluster server node on the IBM ECM Cloud Private Container Cluster on RHEL 8.0 .
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux






 !!"!
!"#!!$%
  &!

!
'!
(!'! !
&!)!*+,++-,.
/0+1,2'!
((#3!
! 45&5

!6&7,
 

Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Contents
Molecular Biology Installations - ASB Software Development Limited Publications
8
Ceramics - ASB Software Development Limited Publications8
IBM Installations - ASB Software Development Limited Publications0
8.2.1 Creating an example Docker Container.
8.2.2 Creating a Dockerfile+,
8.2.2.1 Defining the services in a Compose file+
8.2.3 Building and running the web app with Compose++
8.2.4 Editing the Compose file to add a bind mount+8
8.2.5 Experimenting with some other commands+1
+
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Molecular Biology Installations - ASB Software Development
Limited Publications
9!*:::,80,:;+++<70088.+1
4!$%=> 0
9!*:::,80,:;++7?18,,78
&5@#!!@%@)4-.;&3@5&&A=&3&3434@3@3B43@B,-
6&7,
Ceramics - ASB Software Development Limited Publications
9*:::! :C"$!
!4!$!%659!B 
43
8
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


IBM Installations - ASB Software Development Limited
Publications
9!*:::,80,:;++808<.800.
#!!45+1"!6(6&7,! ;
9!*:::,80,:;+++.0?,<.00
=%45>3!#!!%+,1>,!+1!66&7,
9!*:::,80,:;++1+<0+7,?
D#"!4!$(66&7,!)5
11+
9!*:::,80,:;+++?+7<1,+0,
45!#$!04!$-((%>(%E"F$%6&7,
9!*:::,80,:;++<7+87,7.
45!#G114!$F$@6&7,%!5! "188
9!*:::,80,:;++818,078+,7
45 !1184!$&3@7,F$6&7,
9!*:::,80,:;++<.7?1+,,7
4$!5!$!(!51886&7,
9!*:::,80,:;+++?,1?.01<
45&4&4 &((!7
9!*:::,80,:;+++<,07<.+7
4!$%"@H<88(!7,
9!*:::,80,:;+++8<0.?<?
45!5$%@"I>37&3@7
9!*:::,80,:;++8+?<<?+
45B!&(>$!+,84!$F$@(7,
9!*:::,80,:;++++07007,8
B!&(+,8B&J4!$45&3@7,( !
9!*:::,80,:;+++,+1<.0?+.
45744!$&3@(7,
9!*:::,80,:;++8<70+77,,?
4!$%&!!6&7( 45&/#&$2

 !"#$#%$&''())*!$#)'#'!(+#&
,
)*!$#!)'#')!-'##''.#('/'*+

!0&*'!1*2+'324#'##'*
,
56'##'#'4'#26724)'
8
%,'##'')( -93:
,,
31*;%1;3$1'##''.(/
,
603,,,'##'':6#67#'!,
,
56'##''#231*;%1;3*')( -93
*':6#67#'!,

)##'#,'##''.(/4)'' #$#8

'##'29#1)'/'*+#';&8
,,
0
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


)'' #$#'##''.(/<:1+8

)''*'#',,'##''.(/<:1+8
,
8)##'#'##''.(/<!##'1+8
The Eclipse organisation web site shows the link to use to download the IDE versions,
listed with the version number as a link, as shown in Figure 8.36:
Figure 8.36 The downloadable release versions of Eclipse are listed
The link shows that a new release is now available to be installed so we click the
highlighted link (here) shown in Figure 8.37:
Figure 8.37 On clicking the 12th February, 2022 link we are shown the latest release link
The link highlighted in Figure 8.38 is selected to download the latest Eclipse version for
installation.
1
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.38 The highlighted Eclipse IDE install for Linux is selected
The Eclipse installation fileeclipse-java-2022-09-R-linux-gtk-
x86_64.tar.gzis downloaded as shown in Figure 8.39
Figure 8.39 The Download command button is selected.
The Save File radio button option is selected for the zipped tar file as illustrated in Figure
8.40.
Figure 8.40 The Save File radio button option is selected for the zipped tar file.
<
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


The black File icon on the right in Figure 8.41 can be used to display the downloaded
file, eclipse-java-2022-09-R-linux-gtk-x86_64.tar.gz= for extraction as
shown in Figure 8.41:
Figure 8.41 The Folder icon on the right shows the file location
The right-mouse click displays the options which we can use to extract the
installation file as illustrated in Figure 8.42
Figure 8.42 The eclipse-java-2022-09-R-linux-gtk-x86_64.tar.gz is extracted to a folder
Now we can launch the Eclipse IDE program as highlighted in Figure 8.43:
Figure 8.43 The eclipse icon highlighted above is clicked to launch the IDE program
The splash screen of the Eclipse IDE is displayed as shown in Figure 8.44:
?
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.44 The splash screen of the Eclipse IDE
The default workspace directory is displayed on the first launch as shown in Figure
8.45:
Figure 8.45 The workspace folder for the Eclipse IDE defaults to /root/eclipse-workspace
1. Open the Eclipse IDE and navigate to menu Help > Eclipse Marketplace... shown
in Figure 8.46
Figure 8.46 The Help-> Eclipse Marketplace… option is selected.
2. Search for Codewind as shown in Figure 8.47 and click Install.
7
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.47 The Eclipse codewind plugin is searched for.
3. Click the Install button. This gives the message that the active installation has been
archived in November, 2022 and gives the message “No repository found at
https://download.eclipse.org/codewind/milestone/0.14.1/repository/
The eclipse archive is found at the URL link,
https://www.eclipse.org/projects/archives.php , shown in Figure 8.48.
Figure 8.48 The Codewind project is found archived since November 2022.
4. The archived Codewind project is downloaded, since this is a zipped file of all
versions for all the IDEs (eg IntelliJ, Eclipse, vscode etc) on all supported plaforms
(eg, Linux, Windows, Apple Mac, etc) it is very large at 48.1 GBytes! See Figure
8.49:
Figure 8.49 The codewind.tgz file is downloaded
The download status shows an estimate of around 2 hours to complete the
download as shown in Figure 8.50.
.
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.50 the status of the codewind.tgz file download is displayed
5. The downloaded codewind.tgz file is selected for extraction as shown in Figure 8.51:
Figure 8.51 the codewind.tgz file is now downloaded for extraction
6. The folder codewind is created under the /eclipse folder and the tgz file is copied
to the path as shown in Figure 8.52:
Figure 8.52 the codewind plugins are extracted to the /eclipse/codewind folder we created
The codewind.tgz file is unpacked using the commands as follows (shown in Figure
8.53).
cd /root
cd Downloads
mv codewind.tgz /eclipse/codewind
cd /eclipse/codewind
tar -zxvf codewind.tgz
,
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.53 the commands to move the codewind.tgz file and extract the installation plugins
7. The extraction takes quite a few minutes to complete and requires 70 GBytes of free
disk storage. The last page of the list is shown in Figure 8.54
Figure 8.54 the last page of the extracted tar list.
8. We navigate to the
/eclipse/codewind/downloads/codewind-installer/0.14.1/latestpath of
the extracted install sets. The command to install the codewind for Linux is run as
follows with the output shown in Figure 8.55:
./cwctl-linux install
Figure 8.55 The ./cwctl-linux install command is run to create the codewind containers

Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


9. The docker-compose system is required to be installed since we get the message
ERRO[0000] exec: “docker-compose” : executable file not found in
$PATH as shown in Figure 8.56.
Figure 8.56 The codewind system starts after we install docker compose.
See https://docs.docker.com/compose/install/ for the home web page for docker
compose.
To install the following command is used:
curl -L
"https://github.com/docker/compose/releases/download/1.24.1/docker-
compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
After the docker compose is installed, the codewind containers start with no errors
as shown using the docker ps command in Figure 8.57.
Figure 8.57 The docker ps command shows the codewind containers are up and running now
Next, we need to load the Eclipse plugin from the codewind.zip repository.
We select Help -> Install New Software from the Eclipse IDE workplace as shown in
Figure 8.58:
+
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.58 The Help-> Install New Software menu item is selected for codewind explorer
The codewind.zip file is loaded by clicking Open (dated 25 February, 2021) as
shown in Figure 8.59.
Figure 8.59 The codewind.zip file is selected from the installation path
/eclipse/codewind/archives/codewind-eclipse/0.14.1/latest
The Add Repository Add command is clicked as shown in Figure 8.60:
8
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.60 The Add Repository Add command is selected
The codewind software tick box is selected as shown in Figure 8.61:
Figure 8.61 The codewind software tick box is selected and the Next command clicked
0
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


The codewind base version is displayed as illustrated in Figure 8.62 and the Next
command selected:
Figure 8.62 The codewind base version is displayed and the Next command selected
The codewind Public License is displayed and the I accept radio button option is
selected as shown in Figure 8.63 and the Finish command button is clicked to install
the codewind plugin.
Figure 8.63 The Finish command button is clicked to install the codewind plugin
The installed Codewind for Eclipse plugin is now displayed in the Eclipse Welcome
page overview as shown in Figure 8.64:
1
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.64 The Codewind for Eclipse plugin is now installed
The Open Codewind Explorer view is selected from the Eclipse IDE as shown in
Figure 8.65:
Figure 8.65 The Open Codewind Explorer view is selected from the Eclipse IDE
A new Codewind project is created by right-mouse clicking on the Codewind
Explorer as shown in Figure 8.66:
Figure 8.66 A Codewind project is created by right-mouse clicking on the Codewind Explorer
<
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Select the project type required from the scrollable list. Then enter the required
Project Name. We choose Appsody Python Flask template project type as shown in
Figure 8.67:
Figure 8.67 The Appsody Python Flask template is selected for our container development
Wait for the template build status to complete for the Project name we created as
shown in Figure 8.68
?
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.68 The status of the Codewind project build is displayed as shown
The ASBCodeWindTest project is shown running as shown in Figure 8.69:
Figure 8.69 The ASBCodeWindTest is running
The Eclipse IDE Project Explorer window is opened as shown in Figure 8.70:
7
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.70 The Eclipse IDE Project Explorer window is opened
Double-click on __init__.py to open the editor as shown in Figure 8.71:
Figure 8.71 The Project Explorer shows the Python code used for our Container
Another method to develop a container is to create the required files for the docker
compose development system using the vi editor to create the required files used to
generate the container. The following sub-section, 8.2.1, creates an example Docker
Container using the docker compose program text files.
8.2.1 Creating an example Docker Container
A full tutorial is available at the following link:
https://docs.docker.com/compose/gettingstarted/
For the docker compose program we need to create a folder to hold the four files to
be used for it to build the actual docker container image.
The app.py python code file contains the web responses using the redis and flask
web application imported python packages.
.
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


The requirements.txt file is used for docker compose, just to define the two
python packages we are using (flask and redis).
The docker-compose.yml file is used to define the container interface
environment, the ports, exposed volume and name information used by docker
compose to build the container image.
The Dockerfile contains the Python installation requirements, using the pip
installer, and defines the version of python the docker compose program uses as
shown in Figure 8.72.
Figure 8.72 The folder and files used by docker compose are created using mkdir and vi
 !" !%F!
mkdir composetest
cd composetest
vi Dockerfile
The Dockerfile file is edited using the vi editor as shown in Figure 8.73:
Figure 8.73 The Dockerfile file is edited using the vi editor
The app.py file is edited using the vi editor as shown in the code list below:
import time
import redis
from flask import Flask
app = Flask(__name__)
cache = redis.Redis(host='redis', port=6379)
def get_hit_count():
retries = 5
while True:
try:
return cache.incr('hits')
except redis.exceptions.ConnectionError as exc:
if retries == 0:
raise exc
retries -= 1
+,
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


time.sleep(0.5)
@app.route('/')
def hello():
count = get_hit_count()
return 'Hello World! I have been seen {} times.\n'.format(count)
The python requirements for the docker compose container are created using the
command: vi requirements.txt entered as a list:
flask
redis
8.2.2 Creating a Dockerfile
The Dockerfile holds the commands to drive the way docker compose builds a
Docker container image. The container image contains all the dependencies the
Python application requires, and also defines the Python version itself.
The Dockerfile contains the following definitions:
FROM python:3.7-alpine
WORKDIR /code
ENV FLASK_APP app.py
ENV FLASK_RUN_HOST 0.0.0.0
RUN apk add --no-cache gcc musl-dev linux-headers
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
CMD ["flask", "run"]
The definitions in the preceding list tell Docker to do the following:
Build a container image starting with the Python 3.7 image.
Set the python code working directory to /code.
Set the environment variables (starting with ENV) used by the flask command.
Install the gcc compiler so the Python packages can be compiled to improve the
performance of the container image.
Copy the requirements.txt containing the Python package list, and install the
Python dependencies.
Copy the current directory (defined by a full-stop) in the project to the workdir in
the container image.
Set the default command for the docker container to flask, run.
8.2.2.1 Defining the services in a Compose file
The file called docker-compose.yml is created using the vi editor, in the
composetest directory and the lines inserted as in the following list:
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
The docker compose file, docker-compose.yml, provides the configuration for two
services: web and redis and is created using vi as shown in Figure 8.74:
+
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.74 the docker-compose.yml configuration file is edited using the vi editor
The web service uses a docker container image that’s built from the Dockerfile (see the
preceding Section, 8.2.2 Creating a Dockerfile) we created earlier, in the current composetest
directory. It then binds the docker container and the host Linux machine to the exposed
port, 5000. This example service uses the default port for the Flask web server, 5000.
The redis service uses a publicly available Redis docker container image pulled from the
Docker Hub registry.
8.2.3 Building and running the web app with
Compose
From the composetest project directory, the docker-compose up command can be used to
run the web application as shown in Figure 8.75:
docker-compose up
Figure 8.75 The output from the docker-compose up command
Enter http://127.0.0.1:5000/ (the localhost IP), or http://172.19.0.3:5000/ in a
browser to see the web application running from the docker container, as shown in Figure
8.76.
Figure 8.76 The first use of the test container web application
The installed docker container images can be listed using the command as follows:
docker image ls. The list of docker container images is shown in Figure 8.77.(Notice that
the first image in the list, is our composetest_web container).
++
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.77 The list of docker-compose created docker images.
The full list of commands and the output is shown in the following Figure 8.78:
Figure 8.78 The log of the docker compose build of container images.
CTRL/C can be used to stop the docker images loaded and running earlier as shown in
Figure 8.79:
+8
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.79
The CTRL/C command stops the running Docker compose container images.
8.2.4 Editing the Compose file to add a bind mount
During development, it is useful if you can make changes on-the-fly so that the python web
application can be developed and changes tested on the running docker compose container
for a faster turnaround for testing and code development.
This can be done by using vi to edit the docker-compose.yml in the composetest project
directory to add a bind mount for the web service as shown in the updated configuration
file for docker-compose.yml (the changes are highlighted in bold):
Notice that the volumes line below must be indented.
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
environment:
FLASK_ENV: development
redis:
image: "redis:alpine"
The new volumes key we added, mounts the current project directory (identified by the
full-stop) on the host to /code inside the container, allowing a modification to be made to
the code on-the-fly, without having to rebuild the container image. The environment key
sets the FLASK_ENV environment variable to “development”, which indicates that the flask
run should be run in development mode and this causes the running container to reload
the code on a change.
(The FLASK_ENV environment variable is deprecated now and you get a message to replace
this with FLASK_DEBUG).
NOTE: This mode should only be used in development.
The changes to our docker-compose.yml configuration file is shown, highlighted in Figure
8.80.
+0
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


Figure 8.80 The highlighted changes are made to our docker-compose.yml configuration file.
Next, we can rebuild the container images using the docker-compose up --build option:
docker-compose up --build as shown in Figure 8.81.
Figure 8.81 The development option for the docker-compose container is running
Now, we can test the effect of making a code change:
return 'Hello from Docker! I have been seen {} times.\nUpdated by ASB
Development Software Limited 6th December 2022'.format(count)
to the python we have in the app.py file, as highlighted in Figure 8.82:
Figure 8.82 The additional text is added as shown above to demonstrate the debug mode.
Without having to rebuild the web application using docker-compose, we immediately see
our text change on the Firefox web page which is pointing at our development container
web application as shown in Figure 8.83:
Figure 8.83 The output from the web application page shows we have changed the code successfully!
To list the docker-compose container images we are running, we can use the docker-
compose ps command as illustrated in Figure 8.84:
Figure 8.84 The docker-compose ps command lists the running docker container images
8.2.5 Experimenting with some other commands
To run the container services in the background, just append the -d flag (which stands for
“detached” mode) to the docker-compose up command and then use docker-compose
ps to see what is currently running:
docker-compose up -d
+1
Installation of the Archived Eclipse Codewind and an Example using Docker Compose on
RHEL 8 Linux


docker-compose ps
The docker-compose run command allows us to run one-off commands for a running
container service. For example, to see what environment variables are available to the web
service:
docker-compose run web env
The output from this command is shown below on the system we have been developing on
in Figure 8.85:
Figure 8.85 The output from the docker-compose run web env command, highlighted above
The help system for docker-compose is displayed using the command, docker-compose
--help which can be used to view other available commands.
As you might expect, the containers can be stopped using the command:
docker-compose stop
To stop and remove all the running containers entirely, you can use the down command.
The option, --volumes will, in addition, remove the data volume used by the Redis
container:
docker-compose down --volumes
Finally, to save space, the codewind.tgz file can be removed using the command: rm -rf
codewind.tgz as shown in Figure 8.86.
Figure 8.86 The installation file, codewind.tgz, is deleted from the Linux server
+<
ResearchGate has not been able to resolve any citations for this publication.
ResearchGate has not been able to resolve any references for this publication.