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

Document installing on Arch Linux #135

Open
ecthiender opened this issue May 3, 2017 · 45 comments
Open

Document installing on Arch Linux #135

ecthiender opened this issue May 3, 2017 · 45 comments

Comments

@ecthiender
Copy link

@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
Copy link
Contributor

@itamarst 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
Copy link
Author

@ecthiender 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
Copy link
Contributor

@itamarst itamarst commented May 4, 2017

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

@dlasalle
Copy link

@dlasalle 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
Copy link
Contributor

@itamarst itamarst commented May 23, 2017

@dlasalle that sounds useful, thanks for the link!

@starkers
Copy link

@starkers 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
Copy link
Contributor

@itamarst 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
Copy link
Contributor

@itamarst 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
Copy link

@starkers 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
Copy link
Contributor

@itamarst 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
Copy link

@farcaller 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
Copy link
Contributor

@itamarst itamarst commented Jul 22, 2017

Could you attach telepresence.log?

@farcaller
Copy link

@farcaller 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
Copy link

@farcaller 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
Copy link
Contributor

@itamarst itamarst commented Jul 24, 2017

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

@itamarst
Copy link
Contributor

@itamarst 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
Copy link
Contributor

@itamarst 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
Copy link

@starkers starkers commented Jul 26, 2017

@itamarst
Copy link
Contributor

@itamarst itamarst commented Jul 26, 2017

@starkers ok, 0.62 is out. thanks!

@starkers
Copy link

@starkers starkers commented Jul 26, 2017

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

@ark3
Copy link
Contributor

@ark3 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
Copy link

@starkers 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
Copy link
Contributor

@ark3 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
Copy link
Contributor

@ark3 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
Copy link

@starkers starkers commented Dec 13, 2017

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

@ark3
Copy link
Contributor

@ark3 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
Copy link

@starkers starkers commented Mar 17, 2018

@starkers
Copy link

@starkers 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
Copy link
Contributor

@ark3 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
Copy link

@starkers 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
Copy link
Contributor

@ark3 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
Copy link

@starkers 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
Copy link
Contributor

@ark3 ark3 commented May 14, 2018

@ark3
Copy link
Contributor

@ark3 ark3 commented Nov 6, 2018

As @starkers is doing a great job with the AUR, perhaps this should be a documentation issue now.

@starkers
Copy link

@starkers starkers commented Nov 6, 2018

I would suggest the aur package is working yes (people complain at me immediately if there are issues normally..)

One thing I'd say it's that my offer is still open for somebody from the project to co-manage it with me (bus factor)

@ark3 ark3 changed the title Support for installing on Arch Linux Document installing on Arch Linux Nov 6, 2018
@ark3
Copy link
Contributor

@ark3 ark3 commented Nov 6, 2018

We should indicate in the docs that an AUR is available, that it is volunteer-maintained (thank you!), and that more help is desired.

@starkers
Copy link

@starkers starkers commented Nov 6, 2018

Happy to PR that tonight when my kids are in bed (no problem, telepresence rocks!)

@stefancocora
Copy link

@stefancocora stefancocora commented Nov 19, 2018

FYI , left a comment in the AUR comments for this pkg , probably better to add it here for enhanced visibility.
@starkers the current PKGBUILD for telepresence 0.93 won't build in a clean systemd-nspawn chroot ( the chroot used by default by the arch devtools [1] )

I had to add extra dependencies to the makedepends list , here is the diff:

diff telepresence-094/PKGBUILD telepresence-093/PKGBUILD
3,4c3,4
< pkgver=0.94
< pkgrel=1
---
> pkgver=0.93
> pkgrel=33
11,13c11
<   'git'
<   'python'
<   'python-pip'
---
>     'git'
25c23
< md5sums=('695a6a116fd0cfe9533947e5bf8cd882')
---
> md5sums=('c137d232e206d8c2f67105d5bfafef99')

[1] https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot

@miles-
Copy link

@miles- miles- commented Jan 17, 2019

Similar to above, the current AUR package installs telepresence 0.94. I had to modify the md5sum in the PKGBUILD to b438de9bd94ca03ac63686d0bfb1941e.

@Enelar
Copy link

@Enelar Enelar commented Aug 28, 2019

Hm, can you please explain what's the problem with aur?
yay -s telepresence worked for me. Why am I forced to install from source?

@arthurtaborda
Copy link

@arthurtaborda arthurtaborda commented Nov 7, 2019

I am having this problem when installing both from sources or from AUR:

Installing Telepresence in /home/arthur/.cache/yay/telepresence/pkg/telepresence/usr
Built /tmp/tmp.cRfRp5p4J8/dist/telepresence
warning: no previously-included files matching '*' found under directory 'docs/_build'
Error: Command '['/tmp/tmp0qmx05e9/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "packaging/build-sshuttle.py", line 77, in <module>
    main()
  File "packaging/build-sshuttle.py", line 73, in main
    build_sshuttle(output)
  File "packaging/build-sshuttle.py", line 44, in build_sshuttle
    check_call(["python3", "-m", "venv", str(build / "venv")])
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python3', '-m', 'venv', '/tmp/tmp0qmx05e9/venv']' returned non-zero exit status 1.
==> ERROR: A failure occurred in package().
    Aborting...
Error making: telepresence

Could someone please help?

@dbirks
Copy link

@dbirks dbirks commented Nov 7, 2019

@arthurtaborda Could you make sure python-pip is installed? I just noticed that's missing from the dependencies.

@BrendanBall
Copy link

@BrendanBall BrendanBall commented Dec 6, 2019

I successfully installed telepresence via the aur but running it doesn't work. See #1210 . I can't even get a basic telepresence --run-shell to work.

@Arxcis
Copy link

@Arxcis Arxcis commented Feb 14, 2020

I have had success with linuxbrew on arch.

With linuxbrew installed I had to do:

brew install datawire/blackbird/telepresence
sudo pacman -S conntrack-tools

After that, telepresence was working for me.

Almost!
I still got this error/warning message Mount error was: fusermount: mount failed: Operation not permitted, but it does not stop me from using telepresence.

➜  Desktop which kproxy 
kproxy () {
	method=${METHOD:-"vpn-tcp"} 
	telepresence --deployment $USER --namespace default --method $method $@ --run $SHELL
}
                                                                                                                                                        
➜  Desktop USER=jonas kproxy
T: Starting proxy with method 'vpn-tcp', which has the following limitations: All processes are affected, only one telepresence can run per machine, 
T: and you can't use other VPNs. You may need to add cloud hosts and headless services with --also-proxy. For a full list of method limitations see 
T: https://telepresence.io/reference/methods.html
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster using the existing proxy Deployment jonas

T: No traffic is being forwarded from the remote Deployment to your local machine. You can use the --expose option to specify which ports you want to 
T: forward.

T: Mounting remote volumes failed, they will be unavailable in this session. If you are running on Windows Subystem for Linux then see 
T: https://github.com/datawire/telepresence/issues/115, otherwise please report a bug, attaching telepresence.log to the bug report: 
T: https://github.com/datawire/telepresence/issues/new

T: Mount error was: fusermount: mount failed: Operation not permitted
T: Setup complete. Launching your command.
                                           
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
"Other" OS Platforms
Buckets
Packaging and Install
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.