Giter VIP home page Giter VIP logo

pygmy-legacy's Introduction

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

pygmy-legacy's People

Contributors

alexskrypnyk avatar cgoodwin90 avatar dasrecht avatar freedomben avatar fubarhouse avatar kmbremner avatar schnitzel avatar tobybellwood avatar twardnw avatar vincenzodnp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygmy-legacy's Issues

Example for multiple web-servers in one application

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_ROUTEs 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.

Documentation? How to use?

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.

WSL insecure ssh key

Hi,

I've tried to start the pygmy service on Windows with WSL, but I'm getting an insecure ssh key error.

screen shot 2018-08-02 at 12 21 41

The key's permission is setup properly inside WSL, although seemingly pygmy having issues identifying it properly.

Unable to connect to Mailhog from container

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?

Ubuntu 17.10 ... 0.0.0.0:53: bind: address already in use

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>'```

Local SSL Support

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.

Odd exceptions on switching between environments

Hi,

This issue occurred couple of times lately:

image

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:

  1. stop containers
  2. try pygmy stop
  3. check docker ps and kill all
  4. pygmy update
  5. pygmy up

'Locale' problems may be possible, since those projects are in Finnish, but still does not make much sense.

Empty commented lines and apersand in /etc/resolv.conf makes pygmy fail

On Fedora my /etc/resolv.conflooks 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

Allow SSH keys from the Gnupg keyring to be used

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.

Windows support

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.

  • Proxy is reported to not work on windows because of the hosts file (?)
  • Bash commands baked in are simply not available for use in Cmd/PS
  • Resolvr?
  • SSH keys?

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.

local websites are not working after docker4mac upgrade to 2.1.0.0

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.

dnsmasq container ignores local network DNS settings

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!

"Error injected ssh key" when Pygmy attempts to add identity key

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

Docker Compose v2 support

Problem / Motivation

The pygmy tool breaks with the latest Docker Desktop where Docker Compose v2 support is enabled by default.

Steps to reproduce

  1. Install Docker Desktop or update Docker Desktop
  2. Open Docker Desktop Preferences
  3. On the General tab check to see that "Use Docker Compose V2" is enabled by default
  4. Start pygmy by following the recommended steps
  5. Start an Amazee.io Docker Compose local environment by following the recommended steps

Do not pass `--restart always` to services.

https://docs.docker.com/engine/reference/run/#restart-policies---restart

Several of the services are set to always restart whenever the Docker engine restarts.

  • ssh-agent
  • maihog
  • haproxy

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

improve Resolver config on Ubuntu 20.04

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

Keep docker container names consistent

I've noticed, when working with pygmy that the container aliases do not all align:

image

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.

Command not found

Trying to run

pygmy up

after successful installation

zsh: command not found: pygmy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.