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

Support for installing on Arch Linux #135

Open
ecthiender opened this Issue May 3, 2017 · 34 comments

Comments

7 participants
@ecthiender

ecthiender commented May 3, 2017

I develop on Arch Linux and would like to use telepresence on it.

What are your plans on supporting Arch Linux?

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst May 3, 2017

Contributor

Hi,

As a temporary workaround, you can download cli/telepresence off the tag in GitHub, chmod +x and use it. For example:

$ wget https://raw.githubusercontent.com/datawire/telepresence/0.42/cli/telepresence
$ chmod +x telepresence

You'll need to install dependencies (torsocks, python 3.5 or later, sshfs).

As far as longer term support, is my understanding correct that submitting to https://wiki.archlinux.org/index.php/Arch_User_Repository is the simplest way to create an Arch package?

Contributor

itamarst commented May 3, 2017

Hi,

As a temporary workaround, you can download cli/telepresence off the tag in GitHub, chmod +x and use it. For example:

$ wget https://raw.githubusercontent.com/datawire/telepresence/0.42/cli/telepresence
$ chmod +x telepresence

You'll need to install dependencies (torsocks, python 3.5 or later, sshfs).

As far as longer term support, is my understanding correct that submitting to https://wiki.archlinux.org/index.php/Arch_User_Repository is the simplest way to create an Arch package?

@itamarst itamarst added the enhancement label May 3, 2017

@ecthiender

This comment has been minimized.

Show comment
Hide comment
@ecthiender

ecthiender May 4, 2017

Thanks. I will use the cli for now.

Yes, you are right, the simplest way is to create an AUR package.

ecthiender commented May 4, 2017

Thanks. I will use the cli for now.

Yes, you are right, the simplest way is to create an AUR package.

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst May 4, 2017

Contributor

OK, I'll look into AUR when this reaches the top of the stack.

Contributor

itamarst commented May 4, 2017

OK, I'll look into AUR when this reaches the top of the stack.

@dlasalle

This comment has been minimized.

Show comment
Hide comment
@dlasalle

dlasalle May 21, 2017

Another option for creating Arch packages (and packages for other distributions too) is https://bytepackager.com/. It integrates with github for authentication and setting up githooks. You just tell it how to compile and install, and what the dependencies are, then everytime you push a tag to github, it builds a new set of packages.

It's only been up for a few weeks now, but it can build packages for Arch, CentOS, Fedora, and Ubuntu right now.

dlasalle commented May 21, 2017

Another option for creating Arch packages (and packages for other distributions too) is https://bytepackager.com/. It integrates with github for authentication and setting up githooks. You just tell it how to compile and install, and what the dependencies are, then everytime you push a tag to github, it builds a new set of packages.

It's only been up for a few weeks now, but it can build packages for Arch, CentOS, Fedora, and Ubuntu right now.

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst May 23, 2017

Contributor

@dlasalle that sounds useful, thanks for the link!

Contributor

itamarst commented May 23, 2017

@dlasalle that sounds useful, thanks for the link!

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Jul 20, 2017

I've just created an AUR (my first) for this, its just called telepresence.

Should just be a case of pacaur -S telepresence now hopefully.. feedback welcome!

starkers commented Jul 20, 2017

I've just created an AUR (my first) for this, its just called telepresence.

Should just be a case of pacaur -S telepresence now hopefully.. feedback welcome!

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 20, 2017

Contributor

Thank you! I'll go take a look in a bit.

Contributor

itamarst commented Jul 20, 2017

Thank you! I'll go take a look in a bit.

@itamarst itamarst added this to In progress in Telepresence Jul 20, 2017

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 20, 2017

Contributor

@starkers - thanks again for doing this. Some suggestions:

A) It's no longer enough to copy the command-line in. I suggest copying the installation setup used by Homebrew: https://github.com/datawire/homebrew-blackbird/blob/master/Formula/telepresence.rb#L15

That is, checkout telepresence, then:

  1. make virtualenv/bin/sshuttle-telepresence
  2. as you do now, copy telepresence to /usr/bin
  3. copy virtualenv/bin/sshuttle-telepresence to /usr/bin

So two extra steps.

B) There are some additional dependencies (you can make torsocks optional): https://github.com/datawire/homebrew-blackbird/blob/master/Formula/telepresence.rb#L9

C) Is the current dependency Python 3 or Python 2?

D) License is Apache, not GPL.

E) How would new releases get released? I guess as is it'll install newer versions based off git automatically, it just won't update version of the package?

Contributor

itamarst commented Jul 20, 2017

@starkers - thanks again for doing this. Some suggestions:

A) It's no longer enough to copy the command-line in. I suggest copying the installation setup used by Homebrew: https://github.com/datawire/homebrew-blackbird/blob/master/Formula/telepresence.rb#L15

That is, checkout telepresence, then:

  1. make virtualenv/bin/sshuttle-telepresence
  2. as you do now, copy telepresence to /usr/bin
  3. copy virtualenv/bin/sshuttle-telepresence to /usr/bin

So two extra steps.

B) There are some additional dependencies (you can make torsocks optional): https://github.com/datawire/homebrew-blackbird/blob/master/Formula/telepresence.rb#L9

C) Is the current dependency Python 3 or Python 2?

D) License is Apache, not GPL.

E) How would new releases get released? I guess as is it'll install newer versions based off git automatically, it just won't update version of the package?

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Jul 21, 2017

Most excellent feedback thanks! I've taken this and learned some more AUR.. hopefully its up to spec now..

On releases.. I'm afraid I'm just going to bump the number on the git repo every now and then (build from releases, much faster than git). This way at least when a user signals they want to update their system they'll get the more recent version etc..

The build is documented here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=telepresence

I've just insited that all the deps be there..

The package python on Arch is currently 3.6.1 which should be OK I hope.

If datawire wants to co-maintain this (I'm looking at the /packaging dir right now) I'm very happy to do so, just need to sign up for an account, pop in an ssh key and tell me the username (or maintain your own AUR, I'm happy to delete this one too)

starkers commented Jul 21, 2017

Most excellent feedback thanks! I've taken this and learned some more AUR.. hopefully its up to spec now..

On releases.. I'm afraid I'm just going to bump the number on the git repo every now and then (build from releases, much faster than git). This way at least when a user signals they want to update their system they'll get the more recent version etc..

The build is documented here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=telepresence

I've just insited that all the deps be there..

The package python on Arch is currently 3.6.1 which should be OK I hope.

If datawire wants to co-maintain this (I'm looking at the /packaging dir right now) I'm very happy to do so, just need to sign up for an account, pop in an ssh key and tell me the username (or maintain your own AUR, I'm happy to delete this one too)

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 21, 2017

Contributor

Looking good, thanks for all the work! I'll go add that to the documentation.

If we have git access we could probably automate it so it increments version on each release. So will see about getting an account setup.

Contributor

itamarst commented Jul 21, 2017

Looking good, thanks for all the work! I'll go add that to the documentation.

If we have git access we could probably automate it so it increments version on each release. So will see about getting an account setup.

@farcaller

This comment has been minimized.

Show comment
Hide comment
@farcaller

farcaller Jul 22, 2017

Broken for me on arch:

telepresence --new-deployment hello-world --expose 8000 --run-shell -m vpn-tcp results in

Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):

being repeated in the logs until it bails out. Any ideas?

farcaller commented Jul 22, 2017

Broken for me on arch:

telepresence --new-deployment hello-world --expose 8000 --run-shell -m vpn-tcp results in

Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):

being repeated in the logs until it bails out. Any ideas?

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 22, 2017

Contributor

Could you attach telepresence.log?

Contributor

itamarst commented Jul 22, 2017

Could you attach telepresence.log?

@farcaller

This comment has been minimized.

Show comment
Hide comment
@farcaller

farcaller Jul 22, 2017

note that it only fails for vpn-tcp. inject-tcp works fine.

The log:

Context: kubernetes-admin@kubernetes, namespace: default, kubectl_command: kubectl
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', 'cluster-info'],)... ran!
Running 'ssh -V'...Running: (['which', 'torsocks'],)... ran!
Running: (['which', 'sshfs'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'delete', '--ignore-not-found', 'all', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'run', '--restart=Always', '--limits=memory=256Mi', '--requests=memory=64Mi', 'hello-world', '--image=datawire/telepresence-k8s:0.61', '--labels=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37', '--port=8000', '--expose'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'deployment', '-o', 'json', '--export', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)... ran!
Expected metadata for pods: {'creationTimestamp': None, 'labels': {'telepresence': '8c04daa5-d14f-484b-9e30-478a241b7d37'}}
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', '-o', 'json', '--export'],)... ran!
Checking {'pod-template-hash': '3720014081', 'telepresence': '8c04daa5-d14f-484b-9e30-478a241b7d37'} (phase Pending)...
Looks like we've found our pod!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', 'hello-world-3720014081-h0db0', '-o', 'json'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', 'hello-world-3720014081-h0db0', '-o', 'json'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'logs', '-f', 'hello-world-3720014081-h0db0', '--container', 'hello-world'],)...Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'port-forward', 'hello-world-3720014081-h0db0', '38261:8022'],)...Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Listening...
2017-07-22T14:52:58+0000 [-] Loading ./forwarder.py...
2017-07-22T14:52:58+0000 [-] SOCKSv5Factory starting on 9050
2017-07-22T14:52:58+0000 [socks.SOCKSv5Factory#info] Starting factory <socks.SOCKSv5Factory object at 0x7fc5363721d0>
2017-07-22T14:52:58+0000 [-] /etc/resolv.conf changed, reparsing
2017-07-22T14:52:58+0000 [-] Resolver added ('10.200.0.10', 53) to server list
2017-07-22T14:52:58+0000 [-] DNSDatagramProtocol starting on 9053
2017-07-22T14:52:58+0000 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x7fc5362fe390>
2017-07-22T14:52:58+0000 [-] Loaded.
Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... 2017-07-22T14:52:58+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 17.5.0 (/usr/bin/python3.5 3.5.2) starting up.
2017-07-22T14:52:58+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Forwarding from 127.0.0.1:38261 -> 8022
Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Handling connection for 38261
 ran!
Running: (['ssh', '-N', '-oServerAliveInterval=1', '-oServerAliveCountMax=10', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '-R', '*:8000:127.0.0.1:8000'],)...Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'exec', 'hello-world-3720014081-h0db0', '--container', 'hello-world', 'env'],)...Handling connection for 38261
 ran!
Running: (['sshfs', '-p', '38261', '-F', '/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'telepresence@localhost:/', '/tmp/tmp5vd9tepg'],)... Handling connection for 38261
 ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'exec', '--container=hello-world', 'hello-world-3720014081-h0db0', '--', 'python3', '-c', '\nimport socket, sys, json\n\nresult = []\nfor host in sys.argv[1:]:\n    result.append(socket.gethostbyname(host))\nsys.stdout.write(json.dumps(result))\nsys.stdout.flush()\n'],)... ran!
Running: (['kubectl', 'get', 'nodes', '-o', 'json'],)... ran!
Running: (['sshuttle-telepresence', '-v', '--dns', '--method', 'nat', '-e', 'ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -F /dev/null', '--to-ns', '127.0.0.1:9053', '-r', 'telepresence@localhost:38261', '10.200.0.0/16'],)...Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Starting sshuttle proxy.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...firewall manager: Starting firewall with Python version 3.6.1
firewall manager: ready method name nat.
IPv6 enabled: False
UDP enabled: False
DNS enabled: True
TCP redirector listening on ('127.0.0.1', 12300).
DNS listening on ('127.0.0.1', 12300).
Starting client with Python version 3.6.1
c : connecting to server...
Handling connection for 38261
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Warning: Permanently added '[localhost]:38261' (ECDSA) to the list of known hosts.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Starting server with Python version 3.5.2
 s: latency control setting = True
 s: available routes:
c : Connected.
firewall manager: setting up.
>> iptables -t nat -N sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -I OUTPUT 1 -j sshuttle-12300
>> iptables -t nat -I PREROUTING 1 -j sshuttle-12300
>> iptables -t nat -A sshuttle-12300 -j RETURN --dest 127.0.0.1/32 -p tcp
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest 10.200.0.0/16 -p tcp --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest XXX/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest XXX/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest YYY/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Connection to localhost closed by remote host.
Connection to localhost closed by remote host.
>> iptables -t nat -D OUTPUT -j sshuttle-12300
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'delete', '--ignore-not-found', 'all', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)...>> iptables -t nat -D PREROUTING -j sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -X sshuttle-12300
 ran!

farcaller commented Jul 22, 2017

note that it only fails for vpn-tcp. inject-tcp works fine.

The log:

Context: kubernetes-admin@kubernetes, namespace: default, kubectl_command: kubectl
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', 'cluster-info'],)... ran!
Running 'ssh -V'...Running: (['which', 'torsocks'],)... ran!
Running: (['which', 'sshfs'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'delete', '--ignore-not-found', 'all', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'run', '--restart=Always', '--limits=memory=256Mi', '--requests=memory=64Mi', 'hello-world', '--image=datawire/telepresence-k8s:0.61', '--labels=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37', '--port=8000', '--expose'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'deployment', '-o', 'json', '--export', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)... ran!
Expected metadata for pods: {'creationTimestamp': None, 'labels': {'telepresence': '8c04daa5-d14f-484b-9e30-478a241b7d37'}}
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', '-o', 'json', '--export'],)... ran!
Checking {'pod-template-hash': '3720014081', 'telepresence': '8c04daa5-d14f-484b-9e30-478a241b7d37'} (phase Pending)...
Looks like we've found our pod!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', 'hello-world-3720014081-h0db0', '-o', 'json'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'get', 'pod', 'hello-world-3720014081-h0db0', '-o', 'json'],)... ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'logs', '-f', 'hello-world-3720014081-h0db0', '--container', 'hello-world'],)...Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'port-forward', 'hello-world-3720014081-h0db0', '38261:8022'],)...Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Listening...
2017-07-22T14:52:58+0000 [-] Loading ./forwarder.py...
2017-07-22T14:52:58+0000 [-] SOCKSv5Factory starting on 9050
2017-07-22T14:52:58+0000 [socks.SOCKSv5Factory#info] Starting factory <socks.SOCKSv5Factory object at 0x7fc5363721d0>
2017-07-22T14:52:58+0000 [-] /etc/resolv.conf changed, reparsing
2017-07-22T14:52:58+0000 [-] Resolver added ('10.200.0.10', 53) to server list
2017-07-22T14:52:58+0000 [-] DNSDatagramProtocol starting on 9053
2017-07-22T14:52:58+0000 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x7fc5362fe390>
2017-07-22T14:52:58+0000 [-] Loaded.
Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... 2017-07-22T14:52:58+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 17.5.0 (/usr/bin/python3.5 3.5.2) starting up.
2017-07-22T14:52:58+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Forwarding from 127.0.0.1:38261 -> 8022
Running: (['ssh', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '/bin/true'],)... Handling connection for 38261
 ran!
Running: (['ssh', '-N', '-oServerAliveInterval=1', '-oServerAliveCountMax=10', '-F', '/dev/null', '-q', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-p', '38261', 'telepresence@localhost', '-R', '*:8000:127.0.0.1:8000'],)...Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'exec', 'hello-world-3720014081-h0db0', '--container', 'hello-world', 'env'],)...Handling connection for 38261
 ran!
Running: (['sshfs', '-p', '38261', '-F', '/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'telepresence@localhost:/', '/tmp/tmp5vd9tepg'],)... Handling connection for 38261
 ran!
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'exec', '--container=hello-world', 'hello-world-3720014081-h0db0', '--', 'python3', '-c', '\nimport socket, sys, json\n\nresult = []\nfor host in sys.argv[1:]:\n    result.append(socket.gethostbyname(host))\nsys.stdout.write(json.dumps(result))\nsys.stdout.flush()\n'],)... ran!
Running: (['kubectl', 'get', 'nodes', '-o', 'json'],)... ran!
Running: (['sshuttle-telepresence', '-v', '--dns', '--method', 'nat', '-e', 'ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -F /dev/null', '--to-ns', '127.0.0.1:9053', '-r', 'telepresence@localhost:38261', '10.200.0.0/16'],)...Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Starting sshuttle proxy.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...firewall manager: Starting firewall with Python version 3.6.1
firewall manager: ready method name nat.
IPv6 enabled: False
UDP enabled: False
DNS enabled: True
TCP redirector listening on ('127.0.0.1', 12300).
DNS listening on ('127.0.0.1', 12300).
Starting client with Python version 3.6.1
c : connecting to server...
Handling connection for 38261
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Warning: Permanently added '[localhost]:38261' (ECDSA) to the list of known hosts.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Starting server with Python version 3.5.2
 s: latency control setting = True
 s: available routes:
c : Connected.
firewall manager: setting up.
>> iptables -t nat -N sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -I OUTPUT 1 -j sshuttle-12300
>> iptables -t nat -I PREROUTING 1 -j sshuttle-12300
>> iptables -t nat -A sshuttle-12300 -j RETURN --dest 127.0.0.1/32 -p tcp
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest 10.200.0.0/16 -p tcp --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest XXX/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest XXX/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest YYY/32 -p udp --dport 53 --to-ports 12300 -m ttl ! --ttl 42
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Running: (['python3', '-c', "import socket; socket.gethostbyname('hellotelepresence')"],)...Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Connection to localhost closed by remote host.
Connection to localhost closed by remote host.
>> iptables -t nat -D OUTPUT -j sshuttle-12300
Running: (['kubectl', '--context', 'kubernetes-admin@kubernetes', '--namespace', 'default', 'delete', '--ignore-not-found', 'all', '--selector=telepresence=8c04daa5-d14f-484b-9e30-478a241b7d37'],)...>> iptables -t nat -D PREROUTING -j sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -X sshuttle-12300
 ran!

@farcaller

This comment has been minimized.

Show comment
Hide comment
@farcaller

farcaller Jul 22, 2017

And the blame goes to systemd-resolved, I believe.

here's how I fixed it:

#hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
hosts: files mymachines dns myhostname

farcaller commented Jul 22, 2017

And the blame goes to systemd-resolved, I believe.

here's how I fixed it:

#hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
hosts: files mymachines dns myhostname
@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 24, 2017

Contributor

Opening new issue for the systemd-resolved issue: #242

Contributor

itamarst commented Jul 24, 2017

Opening new issue for the systemd-resolved issue: #242

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 24, 2017

Contributor

For Arch packaging:

Either:

  • Create our own AUR based on @starkers one, and then ask him to use it instead.

Or:

  • Open Datawire account for AUR
  • Have @starkers give us commit access

In either case:

  • Add AUR info to documenation.
  • Update packaging/upload-linux-packages.py to modify AUR repository with new version, or maybe even go full templating route as with Homebrew.
Contributor

itamarst commented Jul 24, 2017

For Arch packaging:

Either:

  • Create our own AUR based on @starkers one, and then ask him to use it instead.

Or:

  • Open Datawire account for AUR
  • Have @starkers give us commit access

In either case:

  • Add AUR info to documenation.
  • Update packaging/upload-linux-packages.py to modify AUR repository with new version, or maybe even go full templating route as with Homebrew.

@itamarst itamarst moved this from In progress to Next in Telepresence Jul 24, 2017

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 26, 2017

Contributor

@starkers could you add conntrack-tools to dependencies? It will be necessary as soon as 0.62 is released (hopefully later today).

Contributor

itamarst commented Jul 26, 2017

@starkers could you add conntrack-tools to dependencies? It will be necessary as soon as 0.62 is released (hopefully later today).

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Jul 26, 2017

starkers commented Jul 26, 2017

@itamarst

This comment has been minimized.

Show comment
Hide comment
@itamarst

itamarst Jul 26, 2017

Contributor

@starkers ok, 0.62 is out. thanks!

Contributor

itamarst commented Jul 26, 2017

@starkers ok, 0.62 is out. thanks!

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Jul 26, 2017

OK I've updated the AUR and added dep for conntrack-tools

starkers commented Jul 26, 2017

OK I've updated the AUR and added dep for conntrack-tools

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Sep 27, 2017

Contributor

@starkers Thanks for staying on top of the Telepresence AUR. As of version 0.67 Telepresence needs an additional helper script. Could you add cli/stamp-telepresence to the set of executables installed?

Contributor

ark3 commented Sep 27, 2017

@starkers Thanks for staying on top of the Telepresence AUR. As of version 0.67 Telepresence needs an additional helper script. Could you add cli/stamp-telepresence to the set of executables installed?

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Sep 29, 2017

Thanks for the update, I just saw the other issues with the AUR..

... sorry I didn't test 0.67 :(

@ark3 if datawire simply creates a user on aur.archlinux.org I can give them +rw to the repo

You chaps can integrate this into your release pipes
Update process is pretty straight-forward generally.. EG:

export release=0.67
make update VERSION=$release
# optional: test install it here... with "makepkg -si"
git add :/
git commit -m "updated to $release"
git push

minor version bumps are pretty small diffs actually, don't need a arch build box or whatever.. just need to bump a few numbers... eg: https://aur.archlinux.org/cgit/aur.git/commit/?h=telepresence&id=a9b2ffb4f5a57f73f26d2a9883e8b6a7daec1ed4

starkers commented Sep 29, 2017

Thanks for the update, I just saw the other issues with the AUR..

... sorry I didn't test 0.67 :(

@ark3 if datawire simply creates a user on aur.archlinux.org I can give them +rw to the repo

You chaps can integrate this into your release pipes
Update process is pretty straight-forward generally.. EG:

export release=0.67
make update VERSION=$release
# optional: test install it here... with "makepkg -si"
git add :/
git commit -m "updated to $release"
git push

minor version bumps are pretty small diffs actually, don't need a arch build box or whatever.. just need to bump a few numbers... eg: https://aur.archlinux.org/cgit/aur.git/commit/?h=telepresence&id=a9b2ffb4f5a57f73f26d2a9883e8b6a7daec1ed4

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Sep 29, 2017

Contributor

@starkers Let's see if we can make the AUR part of the Telepresence release process. Could you submit a PR adding something similar to packaging/homebrew-package.sh for Arch Linux support? You've already done nearly all the work, so it would be great to have the Arch commit be yours.

Separately, to thank you for your help, if you send me (ark3@datawire.io) an email with your t-shirt size and shipping address we'd be happy to send you a Telepresence t-shirt!

Contributor

ark3 commented Sep 29, 2017

@starkers Let's see if we can make the AUR part of the Telepresence release process. Could you submit a PR adding something similar to packaging/homebrew-package.sh for Arch Linux support? You've already done nearly all the work, so it would be great to have the Arch commit be yours.

Separately, to thank you for your help, if you send me (ark3@datawire.io) an email with your t-shirt size and shipping address we'd be happy to send you a Telepresence t-shirt!

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Dec 12, 2017

Contributor

@starkers With the release of Telepresence 0.72, we need to install a Python virtualenv as well as executables. There is an install script to automate the process. The Ubuntu/Fedora packaging machinery uses the install script. Can your AUR use it too?

Contributor

ark3 commented Dec 12, 2017

@starkers With the release of Telepresence 0.72, we need to install a Python virtualenv as well as executables. There is an install script to automate the process. The Ubuntu/Fedora packaging machinery uses the install script. Can your AUR use it too?

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Dec 13, 2017

Cool, I'll look into it at lunch today!

starkers commented Dec 13, 2017

Cool, I'll look into it at lunch today!

@plombardi89 plombardi89 added this to "Other" OS Platforms in Roadmap Feb 20, 2018

@Alan01252

This comment has been minimized.

Show comment
Hide comment
@Alan01252

Alan01252 Feb 23, 2018

For those with Arch who want to try telepresence the following works ( assuming you have python3)

sudo pacman -S torsocks socat python3 python-virtualenv
git clone https://github.com/datawire/telepresence.git
cd telepresence
sudo PREFIX=/usr/local/ ./install.sh

Alan01252 commented Feb 23, 2018

For those with Arch who want to try telepresence the following works ( assuming you have python3)

sudo pacman -S torsocks socat python3 python-virtualenv
git clone https://github.com/datawire/telepresence.git
cd telepresence
sudo PREFIX=/usr/local/ ./install.sh

@rhs rhs added this to Packaging and Install in Buckets Mar 8, 2018

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Mar 12, 2018

Contributor

The Telepresence documentation has a list of dependencies, but it does not explain how to install these dependencies on common platforms. We could use your help to fix this! Can someone please suggest how to install those dependencies on Arch? There is a list of packages in this PKGBUILD file; is this still correct?

Contributor

ark3 commented Mar 12, 2018

The Telepresence documentation has a list of dependencies, but it does not explain how to install these dependencies on common platforms. We could use your help to fix this! Can someone please suggest how to install those dependencies on Arch? There is a list of packages in this PKGBUILD file; is this still correct?

@ark3 ark3 added the help wanted label Mar 12, 2018

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Mar 17, 2018

starkers commented Mar 17, 2018

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Mar 17, 2018

OK I think its done but I'm still testing..

I've basically put it all in a virtualenv now and the launch scripts simply activate it.. I'm testing it but will report back later, might need to do some signal trapping or something I hope not tho...

starkers commented Mar 17, 2018

OK I think its done but I'm still testing..

I've basically put it all in a virtualenv now and the launch scripts simply activate it.. I'm testing it but will report back later, might need to do some signal trapping or something I hope not tho...

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Mar 17, 2018

Contributor

Wrapping Telepresence in Vex will lead to tricky shutdown issues, especially with the container method, unless Vex gets signal handling exactly right, and I couldn’t tell you what that means. @starkers Is there any reason you want to avoid using the install script as demonstrated by @Alan01252 above? If we can improve the script to make it better for Arch, please let me know.

Thanks for your help!

Contributor

ark3 commented Mar 17, 2018

Wrapping Telepresence in Vex will lead to tricky shutdown issues, especially with the container method, unless Vex gets signal handling exactly right, and I couldn’t tell you what that means. @starkers Is there any reason you want to avoid using the install script as demonstrated by @Alan01252 above? If we can improve the script to make it better for Arch, please let me know.

Thanks for your help!

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Mar 26, 2018

Hiya

Sorry for not getting back earlier.. So I have been wrapping things inside virtualenv for my own purposes for awhile.. I feel I should explain why though..

Installing things into the system is all well and good until someone with $VIRTUAL_ENV set calls that python (system) app and has it explode in their face.. (and that is me about 70% of the time at least)

I'm forever having people break infrastructure in my work (for example) because their terraform called some boto script that didn't behave properly (the joys of devops).. So its not unusual to ship a virtualenv+requirements.txt with even terraform.

aws cli, gcloud you name it.. they generally need to be handled carefully..

Anyway, yes I looked into vex but in the end I didn't like it..

So what I've done is:

  • self contain the app (reasonably I think.. its also now safe from the fast moving arch environment changes)
  • ensure that someone who calls this with $VIRTUAL_ENV or updated $PATH gets what they expected.
  • ensured signals are correctly passed to python (using dumb-init)

I'm happy to try something, I absolutely am a noob when it comes to setup.py, virtualenvwrapper and arch packaging as a whole, so I'm more than open to try other things..

There isn't much secret sauce.. just two scripts that look a little like this:

cat /usr/bin/telepresence

#!/opt/telepresence/dumb-init /bin/sh

# wrap the virtualenv and extend $PATH to include telepresence

export VIRTUAL_ENV=/opt/telepresence/telepresence-venv
export PATH="${VIRTUAL_ENV}/bin:$PATH"


RUNME=telepresence


# pass args on
"${VIRTUAL_ENV}/bin/${RUNME}" $@

Install steps are at: https://aur.archlinux.org/telepresence.git

NB: I'm aware that there is no support for other architectures but given that arch dumped i386 last year I think its OK for now

starkers commented Mar 26, 2018

Hiya

Sorry for not getting back earlier.. So I have been wrapping things inside virtualenv for my own purposes for awhile.. I feel I should explain why though..

Installing things into the system is all well and good until someone with $VIRTUAL_ENV set calls that python (system) app and has it explode in their face.. (and that is me about 70% of the time at least)

I'm forever having people break infrastructure in my work (for example) because their terraform called some boto script that didn't behave properly (the joys of devops).. So its not unusual to ship a virtualenv+requirements.txt with even terraform.

aws cli, gcloud you name it.. they generally need to be handled carefully..

Anyway, yes I looked into vex but in the end I didn't like it..

So what I've done is:

  • self contain the app (reasonably I think.. its also now safe from the fast moving arch environment changes)
  • ensure that someone who calls this with $VIRTUAL_ENV or updated $PATH gets what they expected.
  • ensured signals are correctly passed to python (using dumb-init)

I'm happy to try something, I absolutely am a noob when it comes to setup.py, virtualenvwrapper and arch packaging as a whole, so I'm more than open to try other things..

There isn't much secret sauce.. just two scripts that look a little like this:

cat /usr/bin/telepresence

#!/opt/telepresence/dumb-init /bin/sh

# wrap the virtualenv and extend $PATH to include telepresence

export VIRTUAL_ENV=/opt/telepresence/telepresence-venv
export PATH="${VIRTUAL_ENV}/bin:$PATH"


RUNME=telepresence


# pass args on
"${VIRTUAL_ENV}/bin/${RUNME}" $@

Install steps are at: https://aur.archlinux.org/telepresence.git

NB: I'm aware that there is no support for other architectures but given that arch dumped i386 last year I think its OK for now

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3

ark3 Mar 26, 2018

Contributor

With the install script, this is what I get:

# PREFIX=/usr ./install.sh 
Installing Telepresence in /usr
Installed Telepresence 0.76

# cat /usr/bin/telepresence 
#!/usr/share/telepresence/libexec/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'telepresence==0.76','console_scripts','telepresence'
__requires__ = 'telepresence==0.76'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('telepresence==0.76', 'console_scripts', 'telepresence')()
    )

# 

Now if I make another virtualenv and activate that, Telepresence still runs just fine, even though VIRTUAL_ENV is set and the PATH has a non-standard python3. This is on Fedora/Ubuntu, but I would expect Python3 to behave the same way on Arch.

Do you see a different result? Or have I misunderstood the issue?

Thanks for your help!

Contributor

ark3 commented Mar 26, 2018

With the install script, this is what I get:

# PREFIX=/usr ./install.sh 
Installing Telepresence in /usr
Installed Telepresence 0.76

# cat /usr/bin/telepresence 
#!/usr/share/telepresence/libexec/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'telepresence==0.76','console_scripts','telepresence'
__requires__ = 'telepresence==0.76'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('telepresence==0.76', 'console_scripts', 'telepresence')()
    )

# 

Now if I make another virtualenv and activate that, Telepresence still runs just fine, even though VIRTUAL_ENV is set and the PATH has a non-standard python3. This is on Fedora/Ubuntu, but I would expect Python3 to behave the same way on Arch.

Do you see a different result? Or have I misunderstood the issue?

Thanks for your help!

@starkers

This comment has been minimized.

Show comment
Hide comment
@starkers

starkers Mar 26, 2018

Ohh thats interesting, I've never tried it this way so will validate it. If this works I could only wish that all python apps were package like this!

starkers commented Mar 26, 2018

Ohh thats interesting, I've never tried it this way so will validate it. If this works I could only wish that all python apps were package like this!

@ark3

This comment has been minimized.

Show comment
Hide comment
@ark3
Contributor

ark3 commented May 14, 2018

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