Giter VIP home page Giter VIP logo

dev-env's Introduction

dev-env

A development environment built upon docker.

overview

The intention of this project is to provide the necessary tools and packages required for a standard golang development environment which is convenient and accessible. The dev-env is built upon the an alpine 3.10 golang image, this includes the following tools/packages:

IDE

support

The dev-env has only been verified on MacOS. It should execute on other operating systems capable of running docker containers, but you may encounter issues.

prerequisites

You'll need Docker to use the dev-env, see Docker for MacOS.

run

TMUX

To execute the dev-env, perform the following:

$ git clone https://github.com/jenkins-x/dev-env
$ cd dev-env
$ ./dev-env

NO TMUX

$ git clone https://github.com/jenkins-x/dev-env
$ cd dev-env
$ ./dev-env no-tmux

tmux

This environment uses tmux to manage its window sessions. The environment is configured with the configuration from here, so a big thank you to Gregory Pakosz for the tmux configuration). The tmux key bindings can be found here, with the exception of the horizontal split below (overridden within the environments .tmux.conf.local file):

  • <prefix> \ splits the current pane horizontally

dev-env's People

Contributors

abayer avatar cagiti avatar edwardmlyte avatar garethjevans avatar jenkins-x-bot avatar jenkins-x-bot-test avatar macox avatar pow-devops2020 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dev-env's Issues

Incorrect permission for ~/.dev-env under Linux host

Describe the bug

When running on Linux, permissions of multiple directories under ~/.dev-env/ are set as root:root which lead to "permissions denied" issues when using the container.

For example:
When running "jx version" and try to upgrade the cli, that fails with "error: mkdir /home/developer/.jx/bin: permission denied" as ~/.dev-env/.jx/bin as user with UID 1000 inside the container doesn't have the permission to write there.

To Reproduce
Steps to reproduce the behavior:

  1. Create fresh dev-env container and launch it (no existing ~/.dev-env/ existing on the host) on a Linux host
  2. "jx version" and ask for an upgrade

Expected behavior
Permissions should set properly on the host for ~/.dev-env.

Screenshots
When using "jx version" + upgrade:
image

Permissions on the host for ~/.dev-env/:
image

Desktop (please complete the following information):

  • OS: Linux - Ubuntu 18.04

`jx boot` uses built in version of jx

Describe the bug

When running jx in the dev-env even though the PATH is set to include a locally built version of jx, jx is the installed version.

** To reproduce**

  1. Build a new version of JX
  2. Put it on the path
  3. Run jx version

See the wrong version

Kube config has wrong file path

Describe the bug
I'm migrating from a Jenkins X dev environment on my local laptop to using the dev environment.

I've built the dev-env and it runs. However it's copied over my kube config file and the paths in the file are incorrect, so whenever I run a kubectl command it fails.

To Reproduce
Steps to reproduce the behavior:
Run the dev-env:
./dev-env
Run the following command:
kc get pods

Expected behavior
A clear and concise description of what you expected to happen.

The K8 pods are displayed

Actual Behaviour
Unable to connect to the server: error executing access token command "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=fork/exec /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud: no such file or directory output= stderr=

Desktop (please complete the following information):
Mac O/S

Additional context
Add any other context about the problem here.

./goland does not work from (X)ubuntu

Describe the bug
There is some sort of problem with the X11 display variable on Ubuntu.

…
Status: Downloaded newer image for rycus86/goland:latest
docker: Error response from daemon: create .0: ".0" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

To Reproduce
Steps to reproduce the behavior:

  1. Run (X)ubuntu.
  2. Follow instructions

Expected behavior
Some IDE opens?

Desktop (please complete the following information):

  • OS: Xubuntu Cosmic
  • Browser N/A
  • Version N/A

feat: variabilize CPU and mem docker container parameters depending on the env

Describe the bug

I'm getting this error when running for the first time the dev-env container:

./dev-env 
checking that the environment file have been created
/home/mpa/.dev-env/.bash_history file doesn't exist, creating...
/home/mpa/.dev-env/.boto file doesn't exist, creating...
/home/mpa/.dev-env/.gitconfig file doesn't exist, creating...
docker: Error response from daemon: Range of CPUs is from 0.01 to 4.00, as there are only 4 CPUs available.
See 'docker run --help'.

The number of CPU specified to run the container is 6, but my machine have only 4 available (maybe I need to talk with my employer).
I assume that the same issue could happen with memory, but 8G is probably more common nowadays.

To Reproduce
Steps to reproduce the behavior:

  1. Start a dev-env container with less than 6 CPUs available

Expected behavior
Should work for machine with less than 6 logical cpu available.

Desktop (please complete the following information):

  • OS: Linux - Ubuntu 18.04

.gitconfig file doesn't get correctly mounted into the environment

Describe the bug

When I start the dev-env, I get my ~/.gitconfig mounted as an empty file, the file is also not writable so a few jx commands fail

Workaround

09:44 $ git diff
diff --git a/dev-env b/dev-env
index 3ae6e2a..56faefe 100755
--- a/dev-env
+++ b/dev-env
@@ -106,7 +106,7 @@ function run(){
                    --volume $MOUNT/.cache:/home/developer/.cache:cached \
                    --volume $MOUNT/.config:/home/developer/.config:cached \
                    --volume $MOUNT/.docker:/home/developer/.docker:cached \
-                   --volume $MOUNT/.gitconfig:/home/developer/.gitconfig:cached \
+                   --volume /Users/garethjevans/.gitconfig:/home/developer/.gitconfig:rw \
                    --volume $MOUNT/.gnupg:/home/developer/.gnupg:cached \
                    --volume $MOUNT/.groovy:/home/developer/.groovy:cached \
                    --volume $MOUNT/.gsutil:/home/developer/.gsutil:cached \

but am sure there is a better way.

feat: use workspace for all repositories

At present, the dev-env assumes you work with golang repositories cloned to a separate workspace. With the movement of golang modules, it's no longer necessary to ensure golang repositories are structured under 'src' on the GOPATH.

So in a view to removing some confusion on this, I propose to remove go-workspace and mount all repositories to ~/workspace within the dev-env.

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.