Hi Shridhar:

I run smartos behind a proxy also (but an unauthenticated proxy server), and I am able to run imgadm commands by using the following syntax:

 * http_proxy=http://proxy.company.com:8000 imgadm avail
 * http_proxy=http://proxy.company.com:8000 imgadm import <UUID>

You would need to replace the "http://proxy.company.com:8000"; with your proxy server, port, (and I believe you can put proxy authentication as part of this also). I found that if I had exported the http_proxy on a separate line, it did not work.

Also, I was able to download images from Joyent with the following commands (I prefer this practice, it allows me to keep a copy of an image, in case Joyent deletes an image, or when we have problems connecting to the internet):

 * You will need to know the UUID of the image (use the command to find
   that: "http_proxy=http://proxy.company.com:8000 imgadm avail" )
 * Then, use that UUID to download the manifest:
     o wget --no-check-certificate -O $UUID.manifest
       https://images.joyent.com/images/$UUID
 * and then the actual image:
     o wget --no-check-certificate -O $UUID.zfs
       https://images.joyent.com/images/$UUID/file
     o (note the /file at the end)
 * You can use the command "sha1sum $UUID.zfs" to check the sha1
   checksum and compare it to the value found in the $UUID.manifest
   file (grep sha1 $UUID.manifest)
     o note: sha1sum is not part of the smartos distribution, I had to
       find my own copy of it
 * To install the image:
     o imgadm install -m $UUID.manifest -f $UUID.zfs

Good luck,
Paul


On 6/30/2017 12:44 PM, Shridhar Daithankar wrote:
Hello,

I am testing a smartos server at office. There is a proxy on lan which
requires authentication.

How do I specify proxy for imgadm, so that the zones etc. can be installed?

I tried environment variable http_proxy/https_proxy with http[s]://
user:password@proxy:port syntax but it is not helping. I also tried replacing
special character in password with URL notation(%XX).

I also went thr. all the links pointed from
https://github.com/joyent/smartos-live/issues/120 but nothing has worked so
far.

The proxy support is working for simple proxy setup.

If I point to another nginx instance acting as proxy, I can see the requests
arriving. However nginx does not understand the CONNECT request imgadm is
sending.

I am using smartos build v0.147+ 20160609T010930Z. I know its old. Hopefully
thats not the problem.

Thanks.




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to