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

Easy local development with werf #1940

Open
distorhead opened this issue Nov 26, 2019 · 8 comments
Open

Easy local development with werf #1940

distorhead opened this issue Nov 26, 2019 · 8 comments

Comments

@distorhead
Copy link
Member

distorhead commented Nov 26, 2019

  • Rebuild and redeploy your application into local cluster when application code has been changed.
  • Support multiple environments for separate projects to run locally.
  • Write an article for habr/medium and tutorials.

Other notes

  • werf k3s|kind [list, start, stop, use]
  • source (werf k3s use asdfsadf)
  • werf local build
  • werf local publish
  • werf local deploy
  • werf local up (build + publish + deploy)
  • => werf feeploy
  • werf k3s list
  • werf k3s create mycluster --version 1.15
  • source $(werf k3s use mycluster)
  • werf build-and-publish
  • werf deploy
@distorhead distorhead added this to To do in 1.1 via automation Mar 10, 2020
@daniel-kun
Copy link

You can consider using https://tilt.dev or https://skaffold.dev/ for this, I don't think it is worth reimplementing, since there are proven solutions available.

@StarpTech
Copy link

How is werf positioning itself compared to all these tools? Which problems aren't solved or solved inelegant?

@alexey-igrychev alexey-igrychev added this to To do in 1.2 Sep 23, 2020
@alexey-igrychev alexey-igrychev removed this from To do in 1.1 Sep 24, 2020
@alexey-igrychev alexey-igrychev removed this from To do in 1.2 Sep 24, 2020
@shurup
Copy link
Member

shurup commented Jan 12, 2021

Local development support became available in alpha starting from v1.2.1, currently it's in v1.2 beta channel as well. To learn more about its state and progress, please read our regular updates on werf v1.2 in #3014.

@echo-devnull
Copy link

Getting this to run with k3s (and not dependency on docker compose) would be "the" defining feature of werf.
We could then work in the same way locally as we can in the actual kubernetes cluster.

In fact we need to get rid of docker-compose type of working! werf is poised to take that position.

@shurup
Copy link
Member

shurup commented Feb 10, 2021

Hi @markmaas and thank you for these thoughts!

We all agree on that point. To be more precise:

  1. At the moment, the basic implementation is ready via werf converge --follow command in werf v1.2 (available in the early access channel). It should work with k3s as well, however we haven't tested it specifically yet. We've tried it against Minikube and Kubernetes embedded to Docker Desktop though.
  2. It would be awesome if you can try it out in k3s and maybe even help with related docs. (Please feel free to contact us here or via Telegram in this case.)
  3. We think using k3s locally for werf should be implemented out-of-the-box and really easy-to-use. Perhaps it means we need to embed it into werf. It is not what we're working on right now but we consider it for future releases.

@echo-devnull
Copy link

echo-devnull commented Feb 22, 2021

1. At the moment, the basic implementation is ready via `werf converge --follow` command in werf v1.2 (available in the early access channel). It should work with k3s as well, however we haven't tested it specifically yet. We've tried it against Minikube and Kubernetes embedded to Docker Desktop though.

Yes, "follow" with stapel type docker building is very close to "magic"

2. It would be awesome if you can try it out in k3s and maybe even help with related docs. (Please feel free to contact us here or via [Telegram](https://t.me/werf_io) in this case.)

I'll be there ;-)

3. We think using k3s locally for werf should be implemented out-of-the-box and really easy-to-use. Perhaps it means we need to embed it into werf. It is not what we're working on right now but we consider it for future releases

What I'm doing, and is working exceptionally well:

k3d registry create registry.localhost --port 5000; \
k3d cluster create mycluster --registry-use k3d-registry.localhost:5000

And then:

werf converge --repo=k3d-registry.localhost:5000/mycluster --dev

And now the whole thing "just works". Quite remarkable.

@shurup
Copy link
Member

shurup commented Mar 17, 2021

Hi again @markmaas! And one more THANK YOU for your information! You could've probably seen our recent updates in local development for 1.2-alpha.

We are also in the process of "strong consideration" of k3s for making next steps with local development in werf, however the fruits of it are not public yet. I think they will be announced soon, stay tuned!

@develar
Copy link

develar commented Jul 25, 2021

One note to comment above regarding k3d-registry.localhost:5000 — on macOS k3d failed to add entry 127.0.0.1 k3d-registry.localhost to /etc/hosts, so, werf cannot resolve host. sudo nano /private/etc/hosts can be used to edit hosts file to add required entry.

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

No branches or pull requests

7 participants