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

"jx get env" returns dev, staging, and production. Then why doesn't "jx get apps" show dev? #1141

Closed
junimukherjee opened this issue Jun 25, 2018 · 5 comments

Comments

@junimukherjee
Copy link

Junis-MacBook-Pro:nodejenx juni$ jx get env
NAME LABEL KIND PROMOTE NAMESPACE ORDER CLUSTER SOURCE REF PR
dev Development Development Never jx 0
staging Staging Permanent Auto jx-staging 100 https://github.com/junibutler/environment-bitermaple-staging.git
production Production Permanent Manual jx-production 200 https://github.com/junibutler/environment-bitermaple-production.git

Junis-MacBook-Pro:nodejenx juni$ jx get apps
APPLICATION STAGING PODS URL PRODUCTION PODS URL
goagainjenx 0.0.1 1/1 http://goagainjenx.jx-staging.35.203.177.62.nip.io
gojenx 0.0.8 1/1 http://jx-staging-gojenx.jx-staging.35.203.177.62.nip.io 0.0.7 1/1 http://jx-production-gojenx.jx-production.35.203.177.62.nip.io
nodejenx 0.0.3 1/1 http://jx-staging-nodejenx.jx-staging.35.203.177.62.nip.io 0.0.3 1/1 http://jx-production-nodejenx.jx-production.35.203.177.62.nip.io

The CloudBees CD for Kubernetes app seems to not show "dev" either.

I have a couple of apps (android) where builds are failing (due to known issues). These are not reported since they never made it to staging. The apps that are failing on dev are just as interesting as the ones on staging and production from a deployment throughout standpoint. If you agree, why did we leave them out?

@jstrachan
Copy link
Member

so we run builds in the dev namespace but we typically never deploy them as external URLs which is why they don't show up in the jx get apps

@jstrachan
Copy link
Member

if you use DevPods then those apps show up too in jx get apps btw: https://jenkins-x.io/developing/devpods/

@junimukherjee
Copy link
Author

okay, thanks. ideally, we should use devpods. but at the end of the day, it is up to the teams. (yet another governance thing...how can we enforce best practices?).

if they choose not to do so, i sill feel they should have a view of build and test failures in the dev/test environment. simply because, there could be an unhealthy drag in dev/test, where a lot of apps might be lying broken. ones that haven't made it to staging for some time, but are flying under the radar.

from a business standpoint, the cloudbees cd for k8s app should throw light on that is my understanding. please let me know if you think otherwise.

from a technical standpoint, i don't know if deploying the dev namespace as external URLs is a challenge, or we didn't do it only because it's not a priority.

@rawlingsj
Copy link
Member

if they choose not to do so, i sill feel they should have a view of build and test failures in the dev/test environment. simply because, there could be an unhealthy drag in dev/test, where a lot of apps might be lying broken. ones that haven't made it to staging for some time, but are flying under the radar.

You can view the build logs for any app when in the dev environment by running jx get build logs, but there are no applications actually running in dev environment, just the build tools like Jenkins, Nexus etc. The first environment an application is deployed to from a pipeline after a change is merged is by default staging which is why you only see apps in staging and production. I.e. this is working as expected.

from a business standpoint, the cloudbees cd for k8s app should throw light on that is my understanding. please let me know if you think otherwise.

Yes but we probably ought to keep CloudBees specific discussions away from the OSS project.

from a technical standpoint, i don't know if deploying the dev namespace as external URLs is a challenge, or we didn't do it only because it's not a priority.

There is no application deployment in the dev environment, applications only run in Preview, Edit, Staging and Production environments. We did talk about renaming the dev environment to be home or something which might help avoid confusion?

@sdoxsee
Copy link

sdoxsee commented Jun 27, 2018

I hope I'm not hijacking this issue but I've run jx create devpod and I'm able to get into the pod and build it with skaffold dev -p dev but I never see the URL i can visit to view my devpod deployed.

Stephens-MacBook-Pro:demo2 sdoxsee$ jx get apps
APPLICATION EDIT PODS URL STAGING PODS URL                                         PRODUCTION PODS URL
demo2                     0.0.2   1/1  http://demo2.jx-staging.35.203.18.88.nip.io 0.0.2      1/1  http://demo2.jx-production.35.203.18.88.nip.io
Stephens-MacBook-Pro:demo2 sdoxsee$ jx get environments
NAME       LABEL       KIND        PROMOTE NAMESPACE       ORDER CLUSTER SOURCE                                                              REF PR
dev        Development Development Never   jx              0
sdoxsee    sdoxsee     Edit        Never   jx-edit-sdoxsee 1
staging    Staging     Permanent   Auto    jx-staging      100           https://github.com/sdoxsee/environment-grabbernebula-staging.git
production Production  Permanent   Manual  jx-production   200           https://github.com/sdoxsee/environment-grabbernebula-production.git
Stephens-MacBook-Pro:demo2 sdoxsee$ jx create devpod --reuse
Reusing pod sdoxsee-maven - waiting for it to be ready...
Pod sdoxsee-maven is now ready!
You can open other shells into this DevPod via jx create devpod --reuse
[root@sdoxsee-maven code]# ls
Dockerfile  Jenkinsfile  charts  mvnw  mvnw.cmd  pom.xml  skaffold.yaml  src
[root@sdoxsee-maven code]#

I can create a new issue if necessary but seeing as this issue is so fresh and is related to "viewing what you're developing" and follows the suggestion above, I though I would hop on this one. Thanks!

jx version
NAME               VERSION
jx                 1.3.35
jenkins x platform 0.0.1580
kubernetes cluster v1.8.10-gke.0
kubectl            v1.10.5
helm client        v2.9.1+g20adb27
helm server        v2.9.1+g20adb27
git                git version 2.17.1

...and after upgrading to jx 1.3.38 I still can't see a URL created for it

UPDATE:

Not sure what I did but everything seems to be working.

Stephens-MacBook-Pro:demo2 sdoxsee$ jx get apps
APPLICATION EDIT     PODS URL                                              STAGING PODS URL                                         PRODUCTION PODS URL
demo2       SNAPSHOT 1/1  http://demo2.jx-edit-sdoxsee.35.203.18.88.nip.io 0.0.2   1/1  http://demo2.jx-staging.35.203.18.88.nip.io 0.0.2      1/1  http://demo2.jx-production.35.203.18.88.nip.io

I'd done jx delete devpod and waited. I might have had to do yet another change to my source to generate a new docker image and THAT one maybe got deployed. I found the URL because the output after the docker rebuild said

NOTES:

Get the application URL by running these commands:

kubectl get ingress demo2-demo2

doing kubectl get ingress demo2-demo2 didn't get me the URL but kubectl get ingress demo2 did it seems. And now I can see it in jx get apps as I showed above. I think the main thing was that the first time didn't seem to create a URL for the devpod but causing a new docker build (by rebuilding the project with a source change with mvn install -DskipTests which updated the target directory) may have remedied it. Hope this helps someone.

Looking forward to #833

I have no more concerns on this issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants