gergelyke.github.io icon indicating copy to clipboard operation
gergelyke.github.io copied to clipboard

Using Skaffold and LocalStack to Develop Cloud Applications Locally

Open gergelyke opened this issue 6 years ago • 13 comments

gergelyke avatar May 13 '18 17:05 gergelyke

Hi Gergely,

thank you for your intro to localstack. What do you think, what is currently the best workflow for developing serverless apps on AWS?

Thanks, Dimitri

tarasowski avatar May 14 '18 07:05 tarasowski

Hi Dimitri,

thanks! For serverless, I'd use the Serverless Framework

I hope that helps!

gergelyke avatar May 14 '18 18:05 gergelyke

Hello @gergelyke , In your original article you mentioned "Should each developer create a development environment for themselves in the cloud?" and answered that there is a drawback to this method, can you elaborate a bit more ? Is it complicated ? does it cost a lot of money ? What are the main obstacles for a developing firm to this that method ?

Thank you

efi-mk avatar Jul 08 '18 14:07 efi-mk

Hi @efi-mk!

There can be a list of drawbacks for setting up development environments for everybody in the cloud:

  • it can become costly,
  • it will be challenging to keep it updated (afaik, there is no off-the-shelf solution for this, you have to build your own)

I hope this answers your question! Please let me know if it did not, and I am happy to provide more details.

gergelyke avatar Jul 08 '18 15:07 gergelyke

Thank you @gergelyke, I completely agree, but I have couple of problems with using only localstack for testing:

  • It does not pose all the limitations that a native environment has
  • It's not updated with the latest api changes
  • What should I do in case I use a service that is not listed there like image recognition or NLP capbilities

For me it looks like testing in the actual native serverless environment is a must before actual deployment. Makes sense ?

Do you think that off-the-shelf solution would make tools like LocalStack obsolete ?

efi-mk avatar Jul 09 '18 17:07 efi-mk

Hi @efi-mk - yeah, that makes sense, I agree with your concerns. As i see, you have to distinguish between local development versus automated testing.

For local development, I'd use LocalStack with Skaffold - for automated testing, I'd provision everything on AWS, and run the functional tests on that infrastructure.

Does that make sense?

gergelyke avatar Jul 09 '18 17:07 gergelyke

Makes sense. @gergelyke is there a way to contact you directly? I have couple of questions regarding your testing methodology.

Thank you for your advice

efi-mk avatar Jul 09 '18 17:07 efi-mk

My DMs are open on twitter: https://twitter.com/nthgergo

gergelyke avatar Jul 09 '18 17:07 gergelyke

Hi @gergelyke. Thank you for a very helpful post. I was able to get the localstack running with skaffold v0.29, but I don't see any logs in the output, even though I set the `DEBUG env var (see below) and I've confirmed that this var is set in the container too. Any idea how to get to the localstack logs? Thank you.

     env:
            - name: SERVICES
              value: 's3:30572,lambda:30574'
            - name: PORT_WEB_UI
              value: '32000'
            - name: DEBUG
              value: '1'

demisx avatar May 17 '19 15:05 demisx

I think I got it going. Looks like in order to for logs to start showing up in skaffold output, the Docker image must be built by skaffold itself, even if the Dockerfile contains just one line:

FROM localstack/localstack

demisx avatar May 17 '19 16:05 demisx

hi @demisx - glad to hear that you liked the post! Since the writing of the article, I've barely used localstack, so I am not sure if I can help, I am sorry

gergelyke avatar May 17 '19 16:05 gergelyke

@gergelyke Yeah, I've got the log part going, but it's not a smooth ride switching endpoint from AWS to localstack. And lack of documentation doesn't help either. I see errors popping up left and right and my AWS usage is very light. Did you find a better alternative to the localstack by any chance?

demisx avatar May 17 '19 16:05 demisx

Can Scaffold or the more recent LocalStack get round issue of supporting multi regions these days? If not can anyone suggest a good alternative to these in order to cater for multi regional setups? Thanks

lxm7 avatar Nov 05 '19 15:11 lxm7