Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a `jx dev go|maven|node` command #718

Closed
rawlingsj opened this issue Apr 25, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@rawlingsj
Copy link
Member

commented Apr 25, 2018

It would good to to spin up a dev pod, in cluster, using a jenkins x builder image and exec into the pod so folks can leverage the cloud for development. Then the os, builds and language version and are all the same as when the apps are built, released and run. This also means folks that have restricted machines or low resources can leverage more of the cloud.

Also @jstrachan has mentioned before about being able to rsync a local filesystem into a pod, so folks can hack in their favourite IDE yet builds happen on the cloud.

Perhaps to start with we have go, maven and node helm chart, install these and use the existing jx rsh to exec into the pod?

This is a sample golang dev deployment yaml that also mounts the docker socket, we'd probably wanna use skaffold instead mind.

apiVersion: extensions/v1beta1
kind: Deployment
  name: go
spec:
  replicas: 1
  selector:
    matchLabels:
      run: go
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        run: go
    spec:
      containers:
      - command:
        - sleep
        - infinity
        image: jenkinsxio/builder-go:0.0.191
        imagePullPolicy: IfNotPresent
        name: go
        resources:
          limits:
            cpu: "2"
            memory: 2046Mi
          requests:
            cpu: 1500m
            memory: 1Gi
        volumeMounts:
        - mountPath: /var/run/docker.sock
          name: docker-socket
      volumes:
      - hostPath:
          path: /var/run/docker.sock
        name: docker-socket
@jstrachan

This comment has been minimized.

Copy link
Member

commented Apr 25, 2018

We could grab the config from Jenkins for all the build pods maybe?

@rawlingsj

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2018

yeah sounds good!

@jstrachan jstrachan closed this Apr 26, 2018

@jstrachan jstrachan reopened this Apr 26, 2018

@jstrachan

This comment has been minimized.

Copy link
Member

commented Apr 26, 2018

@rawlingsj wonder what a good name for these buildpod maybe?

I guess workspace is a bit vague and tends to conjure up the idea of a directory on the file system. shell maybe?

@jstrachan

This comment has been minimized.

Copy link
Member

commented Apr 26, 2018

yay, its almost there!
devpod

jstrachan added a commit to jstrachan/jenkins-x-platform that referenced this issue Apr 26, 2018

jstrachan added a commit to jstrachan/jx that referenced this issue Apr 26, 2018

feat:(dev pods) lets make it super easy to open another shell
so we can do `jx rsh -d` to open another DevPod shell quickly

jenkins-x#718

jstrachan added a commit to jstrachan/jenkins-x-platform that referenced this issue Apr 26, 2018

jstrachan added a commit to jstrachan/jx that referenced this issue Apr 26, 2018

feat:(dev pods) lets make it super easy to open another shell
so we can do `jx rsh -d` to open another DevPod shell quickly

jenkins-x#718

jstrachan added a commit to jstrachan/jx that referenced this issue Apr 26, 2018

jstrachan added a commit to jstrachan/jx that referenced this issue Apr 26, 2018

@jstrachan jstrachan closed this Apr 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.