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

Getting Started Docs seem to have an error #2419

Closed
glennsarti opened this issue May 31, 2021 · 2 comments
Closed

Getting Started Docs seem to have an error #2419

glennsarti opened this issue May 31, 2021 · 2 comments

Comments

@glennsarti
Copy link

glennsarti commented May 31, 2021

Bug

Current Behavior

I am working through the example in https://docs.garden.io/getting-started/2-initialize-a-project and it says to create the backend and frontend modules. However I get an error:

C:\Source\bunnings\garden\examples\demo-project [demo +2 ~0 -0 !]> cd backend
C:\Source\bunnings\garden\examples\demo-project\backend [demo +2 ~0 -0 !]> garden create module
Create new module

? Select a module type: container
? Set the module name: backend

A Garden module named backend already exists in C:\Source\bunnings\garden\examples\demo-project\backend\garden.yml

See error.log for detailed error message
C:\Source\bunnings\garden\examples\demo-project\backend [demo +2 ~0 -0 !]> cd ..
C:\Source\bunnings\garden\examples\demo-project [demo +2 ~0 -0 !]> cd .\frontend\
C:\Source\bunnings\garden\examples\demo-project\frontend [demo +2 ~0 -0 !]> garden create module
Create new module

? Select a module type: container
? Set the module name: frontend

A Garden module named frontend already exists in `examples\demo-project\backend\garden.yml`  and `examples\demo-project\frontend\garden.yml` 

See error.log for detailed error message
C:\Source\bunnings\garden\examples\demo-project\frontend [demo +2 ~0 -0 !]>

And indeed there is already a backend and frontend module defined in

Expected behavior

The documented process should not throw errors

Reproducible example

Follow the documentation to the letter

Workaround

Suggested solution(s)

Additional context

Your environment

  • OS: Windows 10 (20H2)
  • How I'm running Kubernetes: N/A
> garden --version
0.12.22
@glennsarti
Copy link
Author

glennsarti commented May 31, 2021

This also causes issue with the documentation going forward e.g.

The statement below is no longer true and is confusing

Starting with the former, go ahead and open the newly created backend/garden.yml file. You'll find a number of commented-out fields,
which reveal all the options available for the container module type. One of the is the services field.
Just to keep things simple for now, go ahead and replace that block (or append to the file) the following:

Because that file has NO commented out fields and ALREADY has the text you want me to add

kind: Module
name: backend
description: Backend service container
type: container
services:
  - name: backend
    ports:
      - name: http
        containerPort: 8080
        # Maps service:80 -> container:8080
        servicePort: 80
    ingresses:
      - path: /hello-backend
        port: http
tasks:
  - name: test
    command: ["sh", "-c", "echo task output"]

@eysi09
Copy link
Collaborator

eysi09 commented Jun 1, 2021

Hi @glennsarti

Looks you're running these commands in the wrong directory.

We have two versions of the "demo project", one is demo-project-start which is what should be used for the "Initialize a Project" guide.

The other version is demo-project, which is essentially the final version of the starter project, complete with project and module configs.

I can understand how this may seem confusing, and perhaps we can clarify this in the docs.

And please let us know if you bump into anything else as you "kick the tires", we're here to help :)

In the meantime, I'll go ahead and close this one.

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

2 participants