The Ruby version of pygmy is no longer supported - please use https://github.com/pygmystack/pygmy instead.
Historic versions (0.9.11 and earlier) are still available via rubygems if required via gem install pygmy -v 0.9.11
Use pygmystack/pygmy instead
Home Page: https://github.com/pygmystack/pygmy
License: MIT License
The Ruby version of pygmy is no longer supported - please use https://github.com/pygmystack/pygmy instead.
Historic versions (0.9.11 and earlier) are still available via rubygems if required via gem install pygmy -v 0.9.11
Currently the documentation for pygmy is on docs.amazee.io and should be with the project itself.
I am trying to setup a local development environment using Lagoon + Pygmy for a web application with a JavaScript frontend and a PHP/Drupal backend. Therefore I started with the Amazee Drupal Example and tried to adapt it to my needs, but without success so far.
Ideally I would like a setup similar to the following:
Do you have an example available for such a setup?
My naive attempt by setting different LAGOON_ROUTE
s for the frontend and backend services was not successful. My latest problem is that I cannot get the frontend hostname to route to the frontend nginx - I only receive 503 Service Unavailable
instead. Using the LAGOON_LOCALDEV_URL
instead appears to work.
I'm refining a list of Drupal Dev Environment Tools, and had Lagoon on the list; however someone mentioned that pygmy is the tool used for local environments, while Lagoon is more meant for full-fledged production OpenShift-based environments...
Could you include a readme in this project with at least a link to https://docs.amazee.io/local_docker_development/pygmy.html or some 'getting started' steps? It wasn't obvious when I first started walking through the GitHub projects or the Lagoon documentation where to get pygmy or how to use it.
With cachalot
I was able to send mail from PHP application/container to Mailhog by using ssmtp config mailhub=mailhog.docker.amazee.io:1025
. Outgoing mail was routed to Mailhog perfectly.
Upgrading to pygmy
this doesn't work anymore. Apparently the 1025 port isn't forwarded/linked to Mailhog anymore.
Trying with telnet from PHP container:
root@309fadbe2c8d:/var/www/html# telnet mailhog.docker.amazee.io 1025
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Am I doing something wrong or is this a bug?
pygmy restart
does not always inject the ssh key, but pygmy stop && pygmy start
works correctly.
Running pygmy status
shows that the key is injected.
Since I'm on ubunut 17.10 I've this error and this fix here https://askubuntu.com/questions/233222/how-can-i-disable-the-dns-that-network-manager-uses/233223#233223 is working fine on 16.04 but not on 17.10
Error response from daemon: driver failed programming external connectivity on endpoint amazeeio-dnsmasq (cccb334e24a7c810b31ec5b8297aca8c30ddf7a45b6abaf65201a230e8112536): Error starting userland proxy: listen udp 0.0.0.0:53: bind: address already in use
Error: failed to start containers: amazeeio-dnsmasq
/var/lib/gems/2.3.0/gems/pygmy-0.9.8/lib/pygmy/docker_service.rb:13:in `start': Failed to run amazeeio-dnsmasq. Command docker run -d -p 53:53/tcp -p 53:53/udp --name=amazeeio-dnsmasq --cap-add=NET_ADMIN andyshinn/dnsmasq:2.75 -A /docker.amazee.io/127.0.0.1 failed (RuntimeError)
from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:120:in `exec_up'
from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:33:in `up'
from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:300:in `<top (required)>'
from /usr/local/bin/pygmy:22:in `load'
from /usr/local/bin/pygmy:22:in `<main>'```
We saw several use cases where local SSL support would be needed, as a lot of sites are built and ran ssl-only.
Part of pygmy already supports ssl, due to the recent changes on how we build the containers this is broken.
Hi,
This issue occurred couple of times lately:
This exception has something to do with changing between projects on different environments (lagoon and compact). Error thrown on all pygmy commands, not only status.
Workaround to get rid of it was something as following:
'Locale' problems may be possible, since those projects are in Finnish, but still does not make much sense.
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep amazeeio/ | grep -v none | xargs -n1 docker pull | cat
On Fedora my /etc/resolv.conf
looks like this:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
I get this error:
pygmy up
Successfully started dnsmasq
Successfully started haproxy
Successfully created amazeeio network
Successfully connected haproxy to amazeeio network
Successfully started mailhog
Successfully started ssh-agent
Requesting sudo to write to /etc/resolv.conf
status to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.1 # added by amazee.io pygmy
nameserver 127.0.0.53
options edns0 trust-ad' | sudo tee /etc/resolv.conf >/dev/null: -c: line 0: unexpected EOF while looking for matching `''
status to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.1 # added by amazee.io pygmy
nameserver 127.0.0.53
options edns0 trust-ad' | sudo tee /etc/resolv.conf >/dev/null: -c: line 7: syntax error: unexpected end of file
Error configuring local resolver
Removing the empty commented lines and the commented lines containing an "
, it runs through:
# This file is managed by man:systemd-resolved(8). Do not edit.
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
# currently in use.
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
You can use gpg-agent
to serve as an ssh-agent. (simple tutorial). That way your SSH key is bound to your PGP keyring. With this setup there is no traditional id_rsa
file and therefore pygmy fails to add the correct key. Ideally there should be a way for me to forward my ssh-agent to the docker enviroment instead of setting up a new one.
Is there a well-documented list of issues associated with support for native Windows support?
Here's what I've put together, but I'm looking to make it a more accurate and complete list.
I've been referred to this for better windows support, but I don't fully understand the scope of its limitations at this time. https://github.com/amazeeio/amazeeio-docker-windows
Any input to help complete this list would be appreciated.
Yesterday i installed the upgraded to latest docker4mac (2.1.0.0). Since then i had problems with my local dev environments. Everything looks fine, all containers are up and running, but i can not enter the local websites in browser (tested in FF and chrome). I got a "connection to the server failed" error. Restarted pygmy many times. After that did not help i removed all docker containers and volumes and started again with a fresh build (tried more than once). But this did not help. Now i downgraded to docker4mac 2.0.0.3 and everything works again.
I've hit this in two ways, but it's the same essential issue -- the dnsmasq
container is not respecting network-set DNS server settings.
In the office we have a local DNS resolver for various corporate-y things, and when pygmy
is running they don't resolve.
At home I have a Pi-Hole blocking adverts at the network level (and a few custom DNS responses), but when pygmy
is running it doesn't get used and I get ads everywhere.
Seems the dnsmasq
container is defaulting to 8.8.8.8/8.8.4.4 for DNS queries:
$ docker exec amazeeio-dnsmasq sh -c "cat /etc/resolv.conf"
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4
It's not the end of the world, but it occasionally catches me out!
I may have existing services already running and may not want to shut them down in order to develop.
Please make this here: https://github.com/amazeeio/pygmy/blob/master/lib/pygmy/haproxy.rb#L17 configurable
To deter further usage of this gem, we should create a new release that will direct users to the correct implementation.
I'd still like to keep the historic versions at https://rubygems.org/gems/pygmy (as well as the pygmy namespace).
There is no option to disable mailhog like --no-resolver
Hi,
When I run pygmy up
(on OSX 10.13.5) on our project it fails with the error "Error injected ssh key" when trying to add my id_rsa key. If I generate a new key and run pygmy addkey
that works. Is there any way to debug what is happening when it tries to add my identity key (running the commands with the verbose flag doesn't seem to show any more information)?
Thanks,
Richard
The pygmy tool breaks with the latest Docker Desktop where Docker Compose v2 support is enabled by default.
https://docs.docker.com/engine/reference/run/#restart-policies---restart
Several of the services are set to always restart whenever the Docker engine restarts.
When using various local development stacks (or any local development) this causes conflicts.
Related issue from DDEV from a year ago (they had explicit restart: always
previously)
Proposal: remove restart
policy from the definitions.
ssh_agent.rb
def self.run_cmd
"docker run -d " \
"--restart=always " \
"--name=#{Shellwords.escape(self.container_name)} " \
"#{Shellwords.escape(self.image_name)}"
end
haproxy.rb
def self.run_cmd
"docker run -d " \
"-p 80:80 -p 443:443 " \
"--volume=/var/run/docker.sock:/tmp/docker.sock " \
"--restart=always " \
"--name=#{Shellwords.escape(self.container_name)} " \
"#{Shellwords.escape(self.image_name)}"
end
mailhog.rb
def self.run_cmd(domain = self.domain, addr = self.addr)
"docker run --restart=always -d -p 1025:1025 --expose 80 -u 0 --name=#{Shellwords.escape(self.container_name)} " \
'-e "MH_UI_BIND_ADDR=0.0.0.0:80" ' \
'-e "MH_API_BIND_ADDR=0.0.0.0:80" ' \
'-e "AMAZEEIO=AMAZEEIO" ' \
"#{Shellwords.escape(self.image_name)}"
end
In Ubuntu 20.04, rather than updating /etc/resolv.conf , a file should be placed at /etc/systemd/resolved.conf.d
with the contents
[Resolve]
DNS=127.0.0.1:6053
Domains=docker.amazee.io
I've noticed, when working with pygmy that the container aliases do not all align:
If we could get the mailhog container to get a nice prefixed name like the other ones, would be great for filtering.
Much appreciated!
PS: Not sure if anyone really gets the same degree of meticulousness as I do, but could it be called pygmy-* as opposed to amazeeio-* as well? More descriptive of the task that way too.
Trying to run
pygmy up
after successful installation
zsh: command not found: pygmy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.