Giter Site home page Giter Site logo

eclipse-archived / codewind-installer Goto Github PK

View Code? Open in Web Editor NEW
5.0 10.0 28.0 23.44 MB

The installation package for installing Codewind into an editor

Home Page: https://codewind.dev

License: Eclipse Public License 2.0

Go 98.76% Shell 1.24% Dockerfile 0.01%
che cloud codewind container eclipse install kubernetes openshift vscode

codewind-installer's Issues

Update readme

Subject of the issue
Current readme has instructions to set env vars to pull from artifactory. Since artifcatory image pulling is being removed, the instructions needs to go too/changed to make sure the user is logged into docker instead.

Uninstall should work even if user containers are still running

The uninstall fails when only a stop is done beforehand instead of a stop-all, but this should work. User containers should not affect install or uninstall.

The error message is:

REMOVE_IMAGE_ERROR[105]: exit status 1. Failed to remove image - Please make sure all containers are stopped

Incorrect output on project generation/validation

The installer is currently printing out the incorrect output on project creation and validation.

  1. The JSON output doesn't use the correct field names. path should be projectPath and buildType should be projectType
  2. Extra messages are written to stdout. The only output on stdout should be the JSON result.

I will raise a PR to fix this.

Enhancement/Request : PPC64LE version of cwctl

Hi Team,

Recently, I have built the "ppc64le" architecture specific version of cwctl binary. Please let me know if it is possible to make this binary available for download.

The steps I followed to build are:
OS : rhel7.7 / ppc64le

  1. Install dep
  2. Clone codewind-installer source code
  3. cd into the codewind-installer directory
  4. run the command dep ensure -v
  5. Check if you have a vendor folder within your project
  6. run the command GOOS=linux GOARCH=ppc64le go build -o cwctl-ppc64le cmd/cli/main.go

This successfully generated the cwctl binary and I have also validated and used in the "start.sh" script under eclipse/codewind repository.

Please let me know the feasibility and also let me know if I can help in some way.

Regards,
Vrushali

Remove image pulling from artifactory

Subject of the issue
With artifactory credentials set, the install-dev command will pull development images from artifactory. This needs to be removed.

Steps to reproduce the behavior:
Using plugin:

  1. Set user auth credentials
  2. Run codewind plugin
  3. Images are downloaded from artifactory

Using installer:

  1. Set user auth credentials
  2. Run command install-dev
  3. Images are downloaded from artifactory

Expected behavior
Should only pull images form dockerhub.

--tag/-t flag on remove command

Subject of the issue
The install and start command both have the option to specify an image tag. This should also be an option for the remove command.

Expected behaviour
Should the user have multiple codewind images on their machine, they should be able to specify which ones they want to remove.

Installer keeps failing with mount issues.

With the codewind installer I am keep hitting this failure on windows 10. I did not see this behavior for Microclimate and it was stable. My guess is we are not shutting down all the resources that we started through compose file.

Here is the failure...

[ERRO: 11:15:32.186 InstallerWrapper.js.on():213]: Stdout: ==> created file installer-docker-compose.yaml
==> environment structure written to installer-docker-compose.yaml
System architecture is:  amd64
Host operating system is:  windows
Please wait whilst containers initialize...  
Starting codewind-performance ... 

[1A[2K
Starting codewind-performance ... [31merror[0m
[1B
ERROR: for codewind-performance  Cannot start service codewind-performance: b"error while creating mount source path '/host_mnt/c/codewind-workspace': mkdir /host_mnt/c: file exists"

ERROR: for codewind-performance  Cannot start service codewind-performance: b"error while creating mount source path '/host_mnt/c/codewind-workspace': mkdir /host_mnt/c: file exists"
Encountered errors while bringing up the project.
==> finished deleting file installer-docker-compose.yaml

Restrict PFE port range to avoid clashes with application port usage

Auto-assigning ports for the PFE container has revealed a problem in the assigning of the port to be used.
As PFE specifies the hostname interface to be used as 127.0.0.1 (loopback or localhost) we just bind to the port on that interface (say, 32770).
When an application is created, this binds to all interfaces on the first available port, using the IP shorthand 0.0.0.0, This will bind to the public interfaces of any attached hardware, but is unable to bind on localhost because PFE got there first. The port was still marked as available because PFE asked for it just on localhost, not on 0.0.0.0.
We can't use 0.0.0.0 for PFE because that would then expose it on all interfaces, including public ones, creating a security omnishambles. Therefore in order to fix this without losing the dynamic port assignment, we will have PFE try to connect on a range of ports - 10000 to 11000 - that avoids the ranges assigned by Docker (32700+) whilst retaining the ability to skip over any ports that might be in use by other processes.

Remove Images and then Reinstall breaks Start command

@sujeilyfonseca got the installer into a broken state by installing, removing images and installing again, on Windows 10.

Now Codewind cannot start:

PS C:\Users\Administrator\.vscode\extensions\ibm.codewind-0.2.0\bin\installer\windows> .\codewind-installer.exe start
==> created file installer-docker-compose.yaml
==> environment structure written to installer-docker-compose.yaml
System architecture is:  amd64
Host operating system is:  windows
Please wait whilst containers initialize...
Recreating 6cb72082e843_codewind-performance ...
�[1Beating 6cb72082e843_codewind-performance ... �[31merror�[0m
ERROR: for 6cb72082e843_codewind-performance  b'no such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e: No such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e'

ERROR: for codewind-performance  b'no such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e: No such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e'
The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]no such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e: No such image: sha256:2b8b81d9edfd1216a7dbaaecd9b621cfa22f4e76d7904a44719492bfcec1391e
==> finished deleting file installer-docker-compose.yaml
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Waiting for Codewind to start...
Codewind containers are taking a while to start. Please check the container logs and/or restart Codewind
PS C:\Users\Administrator\.vscode\extensions\ibm.codewind-0.2.0\bin\installer\windows> docker images
REPOSITORY                                                                   TAG                    IMAGE ID            CREATED             SIZE
codewind-initialize-amd64                                                    latest                 e69d203d377e        42 minutes ago      213MB
sys-mcs-docker-local.artifactory.swg-devops.com/codewind-initialize-amd64    latest                 e69d203d377e        42 minutes ago      213MB
codewind-performance-amd64                                                   latest                 5e769dd29607        42 minutes ago      90.4MB
sys-mcs-docker-local.artifactory.swg-devops.com/codewind-performance-amd64   latest                 5e769dd29607        42 minutes ago      90.4MB
codewind-pfe-amd64                                                           latest                 113b8717d847        45 minutes ago      744MB
sys-mcs-docker-local.artifactory.swg-devops.com/codewind-pfe-amd64           latest                 113b8717d847        45 minutes ago      744MB
liberty-app-cache                                                            latest                 b7b359b7fa11        About an hour ago   855MB
<none>                                                                       <none>                 3788a282d23b        About an hour ago   895MB
<none>                                                                       <none>                 7f1f3470aed5        2 hours ago         72.9MB
spring-app-cache                                                             latest                 49c0ce0c13aa        2 hours ago         468MB
<none>                                                                       <none>                 9bc92a7a682d        2 hours ago         592MB
<none>                                                                       <none>                 adeea592166d        2 hours ago         468MB
<none>                                                                       <none>                 7fb3fcca0117        26 hours ago        294MB
websphere-liberty                                                            19.0.0.3-webProfile7   3c14b8831fb0        6 days ago          460MB
ibmjava                                                                      8-sfj                  ab418b419902        6 days ago          222MB
ibmcom/codewind-java-project-cache                                           latest                 298e3cb61a74        6 days ago          231MB
golang                                                                       latest                 9fe4cdc1f173        13 days ago         774MB
node                                                                         8-stretch              a7dabdc7cd4b        2 weeks ago         895MB
fabric8/java-alpine-openjdk8-jre                                             latest                 623cf58ad9fd        6 weeks ago         74.7MB
python                                                                       3.4-alpine             c06adcf62f6e        3 months ago        72.9MB
maven                                                                        3.5.4-jdk-8-alpine     fb4bb0d89941        8 months ago        119MB
docker4w/nsenter-dockerd                                                     latest                 2f1c802f322f        8 months ago        187kB
ibmcom/swift-ubuntu                                                          4.1.1
PS C:\Users\Administrator\.vscode\extensions\ibm.codewind-0.2.0\bin\installer\windows> docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
PS C:\Users\Administrator\.vscode\extensions\ibm.codewind-0.2.0\bin\installer\windows>

Even worse, it also appears to still be exiting with a success status, even though CW is not started.

I'm not sure how a user could recover from this other than system prune.

This is a very bad one; please prioritize it accordingly.

Remove github.ibm references

Subject of the issue
License tag and "Installing for Codewind on Kubernetes" link in the readme have github.ibm.com references that need to be removed/changed to the correct references.

Error creating new project: "connect EACCES /var/run/docker.sock"

@juansuerogit commented on Tue Jul 16 2019

Im running CentOS Linux release 7.6.1810 (Core)
with visual studio code code-1.36.1-1562627663.el7.x86_64.rpm
with docker-ce from the yum repository docker-ce-18.06.3.ce-3.el7
with docker-compose from the yum repository docker-compose version 1.24.1, build 4667896

my setup also added a parameter to docker systemd /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --userns-remap=meta
to enable usernamespaces so i didnt have to run all my containers as root.

but then i went to install codewind from visual studio code and the first weird thing was that it told me docker wasnt installed even though it was.
so i clicked ok and then come to find out my /usr/lib/systemd/system/docker.service was replaced without the userns-remap

and then i put back my userns-remap argument into /usr/lib/systemd/system/docker.service

and when i try to create a project in codewind i get
Error creating new project: "connect EACCES /var/run/docker.sock"

BTW my user account is in the docker group.


@juansuerogit commented on Tue Jul 16 2019

fyi my systemd settings are wiped out and replaced with
/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

is this why? because docker is listening on the containerd.sock? instead of the sock codewind is looking for?


@tetchel commented on Wed Jul 17 2019

Hi, we're looking into it. Also linking to #24 since they seem to be caused by the same problem.


@juansuerogit commented on Wed Jul 17 2019

thanks. i downloaded the source code and didnt find any reference to docker.sock. and couldnt find the a log file. its possible you are defaulting to docker.sock but docker is more fragmented now some people even use podman on RHEL 8. and some people use other engines like containerd or crio. so maybe the location of centos 7.6 is change cause now the repo uses containerd.sock and thats why you couldnt detect my docker. giving people choice would be best... installing docker based on configuration or questions or allowing to identify a current installation.


@tetchel commented on Wed Jul 17 2019

The codewind-installer is what is trying to access docker, which uses the Docker SDK for Go, we're trying to figure out what the limitation is.

Strip debug info from built binaries

since moving to the new build all the binaries are now a couple MB bigger

from Liam:

The build command should have this .. -ldflags="-s -w" in it to strip it

Add install flag to return unformatted terminal output

Subject of the issue
The installer currently formats the json output of a docker pull so it is displayed nicely to the terminal. This is good if a user uses the installer manually but this is not good for the editor plugins as it restricts the progress display options.

Currently

latest: Pulling from ibmcom/codewind-pfe-amd64
8ba884070f61: Pull complete 
d29709d3e1de: Pull complete 
c01741a365bf: Pull complete 
01fc0d77508e: Pull complete 
...

Flag needed to display

c01741a365bf"}
{"status":"Downloading","progressDetail":{"current":531126,"total":75403831},"progress":"[\u003e                                                  ]  531.1kB/75.4MB","id":"8ba884070f61"}
{"status":"Downloading","progressDetail":{"current":801477,"total":6473076},"progress":"[======\u003e                                            ]  801.5kB/6.473MB","id":"d29709d3e1de"}
{"status":"Downloading","progressDetail":{"current":785093,"total":6103185},"progress":"[======\u003e                                            ]  785.1kB/6.103MB","id":"c01741a365bf"}
{"status":"Downloading","progressDetail":{"current":1592005,"total":6473076},"progress":"[============\u003e  
...

Remove Travis references

Subject of the issue
The repository has mentions of Travis. Since this installer is now using Jenkins anything referring to Travis should be removed

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.