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

Default stack projects #4653

Closed
JamesDrummond opened this issue Mar 30, 2017 · 4 comments
Closed

Default stack projects #4653

JamesDrummond opened this issue Mar 30, 2017 · 4 comments
Assignees
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@JamesDrummond
Copy link
Contributor

Defining projects in a stacks are not added to a new stack. Do we want to allow this(enhancement) or should this already work(bug)? Alternative is to create a factory to share with others but it would be nice to allow projects to be defined in stack.

Reproduction Steps:
My stack.

{
  "description": "Che and Codenvy Docs",
  "scope": "general",
  "tags": [
    "Java 1.8",
    "Jekyll 3.3.1"
  ],
  "creator": "admin",
  "workspaceConfig": {
    "environments": {
      "default": {
        "machines": {
          "dev-machine": {
            "agents": [
              "org.eclipse.che.terminal",
              "org.eclipse.che.ws-agent",
              "org.eclipse.che.ssh"
            ],
            "servers": {},
            "attributes": {
              "memoryLimitBytes": "3221225472"
            }
          }
        },
        "recipe": {
          "contentType": "application/x-yaml",
          "type": "compose",
          "content": "services:\n  dev-machine:\n    image: jdrummond/ubuntu_jekyll\n"
        }
      }
    },
    "defaultEnv": "default",
    "commands": [
      {
        "commandLine": "mkdir -p /project/che-docs/target; jekyll serve --source /projects/che-docs -d /project/che-docs/target/ --force_polling --incremental",
        "name": "Che Jekyll Serve Incremental",
        "type": "custom",
        "attributes": {
          "previewUrl": "http://${server.port.4000}/"
        }
      },
      {
        "commandLine": "mkdir -p /project/che-docs/target; jekyll serve -s /projects/che-docs -d /project/che-docs/target/ --force_polling",
        "name": "Che Jekyll Serve Full",
        "type": "custom",
        "attributes": {
          "previewUrl": "http://${server.port.4000}/"
        }
      },
      {
        "commandLine": "rm -rf /project/codenvy-docs/target; mkdir -p /project/codenvy-docs/target; ln -fs /projects/che-docs/target/docs /project/codenvy-docs/target/docs/che; jekyll serve -s /projects/che-docs/src/main -d /project/codenvy-docs/target/ --force_polling --incremental",
        "name": "Codenvy Jekyll Serve Incremental",
        "type": "custom",
        "attributes": {
          "previewUrl": "http://${server.port.4000}/"
        }
      },
      {
        "commandLine": "rm -rf /project/codenvy-docs/target; mkdir -p /project/codenvy-docs/target; ln -fs /projects/che-docs/target/docs /project/codenvy-docs/target/docs/che; jekyll serve -s /projects/che-docs/src/main -d /project/codenvy-docs/target/ --force_polling",
        "name": "Codenvy Jekyll Serve Full",
        "type": "custom",
        "attributes": {
          "previewUrl": "http://${server.port.4000}/"
        }
      }
    ],
    "projects": [
      {
        "source": {
          "location": "https://github.com/eclipse/che-docs.git",
          "type": "git",
          "parameters": {}
        },
        "links": [],
        "mixins": [],
        "problems": [],
        "name": "che-docs",
        "type": "blank",
        "path": "/che-docs",
        "attributes": {}
      },
      {
        "source": {
          "location": "https://github.com/codenvy/docs.git",
          "type": "git",
          "parameters": {}
        },
        "links": [],
        "mixins": [],
        "problems": [],
        "name": "codenvy-docs",
        "type": "blank",
        "path": "/codenvy-docs",
        "attributes": {}
      }
    ],
    "name": "default",
    "links": []
  },
  "components": [],
  "name": "Docs Che and Codenvy",
  "id": "stackcd9vap2f4fpnwrcx"
}

codenvy 5.5.0

@bmicklea bmicklea added the kind/question Questions that haven't been identified as being feature requests or bugs. label Apr 10, 2017
@slemeur
Copy link
Contributor

slemeur commented Apr 10, 2017

I'm -1 to this request.
The goal of a stack is not to provided projects into it but a set of technologies, components and configuration items that could be use as a workspace's runtime.

When you want to share a ready-to-use workspace template (including a stack and projects), you should use a Factory.

In your sample what would be interesting:

  • A Jekyll stack (which can be used by anybody working on a Jekyll project)
  • Project templates with che-docs as sample project for this stack.

@JamesDrummond
Copy link
Contributor Author

JamesDrummond commented Apr 10, 2017

I disagree. For most of our ready-to-go stacks, I would agree with your statement but we should allow other stacks to import projects automatically without having to select the projects. Also you can only select one sample project but what if you want multiple? This is also a problem for the normal user that can create stacks but cannot create sample projects from dashboard forcing them to paste a url each time. Also if a users wants to share a stack configuration file how would these sample projects carry over to the other users che server.

We do have factories now for che but this is still an added benefit IMO.

Maybe during the workspace creation we give an option to import default projects defined by the stack.

@slemeur
Copy link
Contributor

slemeur commented Apr 12, 2017

Importing multiple projects while creating the workspace will be covered in the new workspace creation flow: #4359

The stacks are defining the workspace's runtimes only.

A stack could have project templates associated with. Those projects are linked to one or multiple stacks. (we define tags for project templates, tags for stacks and we allow the user to pick the project template with matching tags once the stack have been chosen).
It is planned to provide the ability to the user to define project templates from the dashboard.

I think what you are looking for is not sharing a stack - but a complete workspace. We already have that in place:

  • you can share the workspace configuration
  • you can create a factory
  • A chefile would also be relevant

On Codenvy, it is a bit different. In a team, we'll have ability to create/manage/share workspace templates, stacks and project templates.

Maybe you should clarify the use case you are targeting for Che. As Che is not handling multi-user, if you create the workspace, any users using your Che instance will have the workspace (and will be able to duplicate it).

  • Are you looking for a solution to prepare a custom Che with a pre-populated workspace?

@JamesDrummond
Copy link
Contributor Author

Alright I did not think about adding workspace configuration when creating a workspace. This works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

3 participants