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 Introduction

Codewind Command Line Interface (CLI)

Install Codewind on MacOS or Windows. Prebuilt binary files are available for download on Eclipse.

License Build Status Chat Go Report Card codecov

Table of Contents

Before starting

Ensure that you are logged in to Docker. Type docker login into a command line window and follow the instructions.

Downloading the release binary file for:

MacOS

  1. Download the release binary file to a folder on your system.
  2. Use the cd command to go to the location of the downloaded file in the command line window.
  3. If the binary file has the .dms extension, remove the extension so that the file is named cwctl-macos.
  4. Enter the chmod +x cwctl-macos command to give yourself execution permissions for the binary.
  5. If you already have a codewind-workspace with your projects in it, copy it into your /Users/<username> home directory. If you do not already have a workspace, the CLI creates an empty workspace for you in this directory.
  6. Type ./cwctl-macos in the command line window to run the CLI.
  7. To run a command, enter ./cwctl-macos <command>.

Linux

  1. Download the release binary file to a folder on your system.
  2. Use the cd command to go to the location of the downloaded file in the command line window.
  3. If necessary, remove any file extensions so that the file is named cwctl-linux.
  4. Enter the chmod +x cwctl-linux command to give yourself execution permissions for the binary.
  5. If you already have a codewind-workspace with your projects in it, copy the workspace into your $HOME home directory. If you do not already have a workspace, the CLI creates an empty workspace for you in this directory.
  6. Install docker-compose with Install Docker Compose.
  7. To run the CLI, enter ./cwctl-linux in the command line window.
  8. To run a command, enter ./cwctl-linux <command>.

Windows

  1. Download the release binary file to a folder on your system.
  2. Use the cd command to go to the location of the downloaded file in the command prompt.
  3. Ensure that the binary file has an .exe extension. If it doesn't, add the extension to the file name.
  4. Ensure that your C:\ drive is shared with Docker Desktop for Windows. To check, go to Settings>Shared drives and make sure the C:\ drive check box is selected.
  5. If you already have a codewind-workspace with your projects in it, copy the codewind-workspace into your C:\ directory. If you do not already have a workspace, the CLI creates an empty one for you in this directory.
  6. To get started and see the commands that are available, type the .\cwctl-win.exe command in the command prompt.
  7. To run a command, enter .\cwctl-win.exe <command>.

Building and deploying locally on MacOS

  1. Ensure that you have a Go environment set up. If you don't yet have a Go environment, see Install Go.
  2. Create the directory tree expected ~/go/src/github.com/eclipse
  3. Change to the eclipse directory: cd ~/go/src/github.com/eclipse
  4. Clone the repository by typing git clone https://github.com/eclipse/codewind-installer.git
  5. Set the environment variable: export GO111MODULE=on
  6. Change to the project directory: cd codewind-installer
  7. run go mod tidy
  8. Change to the cli directory: cd cmd/cli
  9. Build the binary and give it a name with the go build -o <binary-name> command. To build a binary without the debug symbols, use the go build -ldflags="-s -w" -o <binary-name> command.
  10. Copy your codewind-workspace into your /Users/<username>/ home directory.
  11. Type ./<binary-name> in the command line window to run the CLI.
  12. To run a sub command, enter ./<binary-name> <command>.

Creating a cross-platform binary

  1. Use the go tool dist list command to get a list of the possible GOOS/ARCH combinations available to build.
  2. Choose the GOOS/ARCH that you want to build for and then enter GOOS=<OS> GOARCH=<ARCH> go build to create the binary. To build a binary without the debug symbols, use the GOOS=<OS> GOARCH=<ARCH> go build -ldflags="-s -w" command.

Running the Tests

Integration tests (Bats-core tests)

  1. Set up your environment by installing bats-core as per the bats-core instructions found at https://github.com/bats-core/bats-core.
  2. Clone the codewind-installer repository.
  3. Use the cd command to go to the top level project directory.
  4. Ensure your system environment is clean by having no Codewind images installed or containers running.
  5. To run the tests, enter the bats integration.bats command in the command line window and wait for the tests to finish.

Unit tests

All tests in current directory and all of its subdirectories

$ go test ./...

All tests from a package (e.g. utils)

$ go test github.com/eclipse/codewind-installer/utils

All tests from a package (e.g. utils) whose names match a regex

$ go test github.com/eclipse/codewind-installer/utils -run ^(TestDetermineProjectInfo)$ # or ^(DetermineProjectInfo)$
$ go test github.com/eclipse/codewind-installer/utils -run ^(TestDetermineProjectInfo)$

Notes

In VSCode, the UI and Command Palette provide easy ways to run specific packages and tests
If tests pass, go test will just report that tests passed

E.g.:

PASS
ok  	github.com/eclipse/codewind-installer/utils

To see more details, use go test -v.

Test coverage

$ ./test.sh -coverage

This is the same as go test ./..., but outputs test coverage scores for each function, package, and an overall score.

API

CLI Commands

Command Alias Usage
project 'Manage Codewind projects'
install in 'Pull pfe & performance images from dockerhub'
start 'Start the Codewind containers'
status 'Print the installation status of Codewind'
stop 'Stop the running Codewind containers'
stop-all 'Stop all of the Codewind and project containers'
remove rm 'Remove Codewind and Project docker images'
templates 'Manage project templates'
version 'Print the versions of Codewind containers, for a given connection'
sectoken st 'Authenticate with username and password to obtain an access_token'
secrole sl 'Manage realm based ACCESS roles'
secrealm sr 'Manage new or existing REALM configurations'
secclient sc 'Manage new or existing APPLICATION access configurations'
seckeyring sk 'Manage Codewind keys in the desktop keyring'
secuser su 'Manage new or existing USER access configurations'
connections con 'Manage connections configuration list'
loglevels log 'Get or set logging levels for Codewind containers'
registrysecrets rs 'Manage docker registry secrets'
diagnostics dg 'Gathers logs and project files to aid diagnosis of Codewind errors'
help h 'Shows a list of commands or help for one command'

Command Options:

project

--url/-u <value> - URL of project to download

Subcommands:

create - Downloads a project created from a template, at the given URL

Flags: --url,-u value URL of project to download --path,-p value Path at which to create the new project --conid value Connection ID of PFE that will be used to validate the project (optional) --username value Username for GitHub account authorized to download the provided URL. Takes precedence over git credentials stored in keychain (optional) --password value Password for GitHub account authorized to download the provided URL. Takes precedence over git credentials stored in keychain (optional) --personalAccessToken value PersonalAccessToken authorized to download the provided URL. Takes precedence over git credentials stored in keychain (optional)

validate - Returns the predicted language and build type for a project, and writes a default .cw-settings to it if one does not already exist

Flags: --path,-p value Project path, on local disk --type,-t value Project build type, if known (not required) --conid value Connection ID of PFE that will be used to validate the project (optional)

bind - Bind a project to Codewind for building and running

Flags: --name,-n value Project name --language,-l value Project language --type,-t value Project Type --path,-p value Project Path --conid value Connection ID

sync - Synchronize a bound project to its connection

Flags: --path,-p value Project Path --id,-i value Project ID --time,-t value UNIX timestamp of the last sync for the given project, in milliseconds

list - List projects bound to a Codewind deployment

Flags --conid value Connection ID

get - Get a single project, requires either the project ID or name When using a project ID the CLI will automatically detect which connection it relates to

Flags --id value Project ID --name Project name --conid Connection ID

restart - Restart a project

Flags --id, i Project ID --conid Connection ID --startMode "run" | "debug" | "debugNoInit"

install

--tag/-t <value> - Dockerhub image tag (default: "latest")
--json/-j - Specify terminal output

Subcommands:

remote - Install a remote deployment of Codewind

Flags: --namespace,-n value Kubernetes namespace to install into --session,-ses value Codewind session secret to encrypt session store --ingress,-i value Ingress Domain eg: 10.22.33.44.nip.io --kadminuser,-au value Keycloak admin user --kadminpass,-ap value Keycloak admin password --kdevuser,-du value Keycloak developer username --kdevpass,-dp value Keycloak developer username initial password --krealm,-r value Keycloak realm to setup --kclient,-c value Keycloak client to setup --pvcsize,-p value Codewind PVC size (integer between 1 and 999 Gigabytes) --kurl value Don't deploy a new Keycloak pod, use an existing one at this URL --konly Install a deployment of Keycloak only

start

--tag/-t <value> - Dockerhub image tag (default: "latest")
--debug/-d - Add debug output

status

--json/-j - Specify terminal output

stop

Note: No additional flags

diagnostics/dg

Note: No additional flags

Subcommands:

collect - Gathers logs and project files to aid diagnosis of Codewind errors

Flags: --conid - Triggers diagnostics collection for the remote codewind connection ID (must have currently configured Kubectl connection)
--eclipseWorkspaceDir/-e - The location of your Eclipse workspace directory if using the Eclipse IDE
--intellijLogsDir/-i ` - The location of your IntelliJ logs directory if not using the IntelliJ IDE default location
--all/-a - Collects diagnostics for all defined connections, remote and local
--projects/-p - Collect project containers information
--nozip/-n - Does not create collection zip and leaves individual collected files in place

remove - Removes the diagnostics directory and all its contents from the Codewind home directory

Note: No additional flags

stop-all

Note: No additional flags

remove

--tag/-t <value> - Dockerhub image tag.

Note: Failing to specify a --tag, will result in an attempt to remove the default latest tagged Codewind images on the host machine.

Subcommands:

local/l - Removes and deletes a Codewind local deployment

Flags: --tag - Docker hub image tag

remote/r - Removes and deletes a Codewind remote deployment from Kubernetes

Flags: --namespace - Kubernetes namespace --workspace - Codewind workspace ID

keycloak/k - Removes and deletes a Keycloak deployment from Kubernetes

Flags: --namespace - Kubernetes namespace --workspace - Keycloak workspace ID

templates

Note: No additional flags

Subcommands:

list/ls - List available templates repos - Manage template repositories

Subcommands:
list/ls - List available template repositories add - Add a new template repository

Flags: --url - URL to template repository index.json --name - Custom name for template repository --description - Custom description for template repository --username - GitHub username (required if accessing the provided URL requires GitHub authentication and you do not provide --personalAccessToken) --password - GitHub password (required if accessing the provided URL requires GitHub authentication and you do not provide --personalAccessToken) --personalAccessToken - GitHub personal access token (required if accessing the provided URL requires GitHub authentication and you do not provide --username and --password)

version

Flags: --conid value Connection ID (see the connections cmd) --all - Show Container versions for all Codewind connections

sectoken

Subcommands:

get/g - Authenticate and obtain an access_token.

Note 1:: The preferred way to authenticate is by supplying just the connection ID (conid) and username. In this mode the command will use the stored password from the platform keyring Note 2:: If you dont have a connection ID (conid) you must supply use the host, realm and client flags Note 3:: You can use a combination of both the connection ID (conid) and host/realm/client flags. In this mode, the host/realm/client flags take precedence override the connection defaults Note 4:: The password flag is optional when used with the connection ID (conid) flag and when a password already exists in the platform keyring. Including the password flag will update the keychain password after a successful login or add a password to the keychain if one does not exist

Flags: --host value URL or ingress to Keycloak service --realm value Application realm --username value Account Username --password value Account Password --client value Client --conid value Connection ID (see the connections cmd)

sectoken

Subcommands:

refresh/r - Refresh access_token using cached refresh_token

Refresh tokens are automatically stored in the platform keychain. This command will use the refresh token to obtain a new access token from the authentication service. The access_token can then be used by curl or socket connections when accessing Codewind.

Flags: --conid value Connection ID (see the connections cmd)

secrealm

Subcommands:

create/c - Create a new realm (requires either admin_token or username/password)

Flags: --host value URL or ingress to Keycloak service --newrealm value Application realm to be created --accesstoken value Admin access_token

secclient

Subcommands:

create/c - Create a new client in an existing Keycloak realm (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm where client should be created --newclient value New client ID to create --redirect value Allowed redirect callback URL eg: http://127.0.0.1:9090/* --accesstoken value Admin access_token

get/g - Get client id (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --clientid value Client ID to retrieve --accesstoken value Admin access_token --username value Admin Username --password value Admin Password

secret/s - Get client secret (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --clientid value Client ID to retrieve --accesstoken value Admin access_token --username value Admin Username --password value Admin Password

seckeyring

Subcommands:

update/u - Add new or update existing Codewind credentials key in keyring

--conid <value> Connection ID (see the connections cmd) --username <value> Username --password <value> Password

validate/v - Checks if credentials key exist in the keyring

--conid <value> Connection ID (see the connections cmd) --username <value> Username

secuser

Subcommands:

create/c - Create a new user in an existing Keycloak realm (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --accesstoken value Admin access_token --username value Admin Username --password value Admin Password --name value Username to add

get/g - Gets an existing Keycloak user from an existing realm (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --accesstoken value Admin access_token --username value Admin Username --password value Admin Password --name value Username to query

setpw/p - Reset an existing users password (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --accesstoken value Admin access_token --username value Admin Username --password value Admin Password --name value Username to query --newpw value New replacement password

addrole/p - Adds an existing role to a user (requires either admin_token or username/password)

--host value URL or ingress to Keycloak service --realm value Application realm --accesstoken value Admin access_token --name value Username to target --role value Name of an existing role to add

connections

Subcommands:

add/a - Add a new connection to the list

Flags: --label value A displayable name --url value The ingress URL of the PFE instance

update/u - Update an existing connection

Flags: --conid value The Connection ID to update --label value A displayable name --url value The ingress URL of the PFE instance

get/g - Get a connection using its ID

Flags: --conid value The Connection ID to retrieve

remove/rm - Remove a connection from the list

Flags: --conid value A Connection ID

list/ls - List known connections

Note: No additional flags

reset - Resets the connections list to a single local connection

Note: No additional flags

loglevels

Flags: --conid value The Connection ID of the remote Codewind installation. Defaults to local.

Arguments: The log level to set, one of error, warn, info, debug, trace

remote

Subcommands:

list/l - List all remote deployments of Codewind

Flags: --namespace value The namespace to check (defaults to all)

registrysecrets

Subcommands:

add/a - Add a new docker registry secret and return the updated list of secrets

Flags: --conid value Connection ID (see the connections cmd). Defaults to local. --address value The address of the docker registry --username value The username for the docker registry --password value The password for the docker registry --locallogin=[true|false] Whether to perform a local docker login to the registry. Defaults to true.

list/ls - List the docker secrets (registries and usernames)

Flags: --conid value Connection ID (see the connections cmd). Defaults to local.

remove/rm - Remove a docker registry secret and return the updated list of secrets

Flags: --conid value Connection ID (see the connections cmd). Defaults to local. --address value The address of the docker registry to remove

help

--help/-h - Shows a list of commands or help for one command

Contributing

Submit issues and contributions:

  1. Submitting issues
  2. Contributing

codewind-installer's People

Contributors

bsteinfeld avatar ebuckle avatar eharris369 avatar hhellyer avatar jcockbain avatar jgwest avatar johnmcollier avatar josephca avatar liamchampton avatar makandre avatar markcor11 avatar mattcolegate avatar maysunfaisal avatar mmulholl avatar nikcanvin avatar rwalle61 avatar sghung avatar sishida avatar stalleyj avatar tobespc avatar yangcao77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codewind-installer's Issues

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 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.

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 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.

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.

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

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.

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

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

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.

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.

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

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

--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.

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.