-
Notifications
You must be signed in to change notification settings - Fork 669
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
Use in air-gap environments with network restriction and no internet [done] #36
Comments
Thanks for sharing this use scenario! Actually there is already checking if there is an existing installation in # if tagui executable is not found, initiate setup() to install tagui
if not os.path.isfile(tagui_executable): However, besides that, For Windows, there is also automated downloading of vcredist_x86.exe, a supporting library from Microsoft, if it is not already installed on the computer. For macOS, there is automated installation of Python 3 SSL certs and OpenSSL. I'm very interested to support usage of TagUI for Python on air-gapped environments or local installations without internet access. I'll think through over it what changes to the package can be made to reduce user friction in using the package in such environments. In the meantime, do post here more of the restrictions, constraints and what is possible in your implementation environment. So that I can figure out which areas can be optimised, without increasing user friction for the primary use case of most users with internet access on their laptops. |
Hi Ken, I've dropped you a message on LinkedIn regarding further collaboration. |
Hi Ken and ycx91. I have actually message Ken on LinkedIn too, regarding installing TagUI that are completely sealed off from the internet. I was thinking if it is also possible to install TagUI at %temp% of Windows operating system. |
The manual way will be for users to -
The question will be how much of above steps to automate or taken care of by the package. Beyond a certain point, the setup can't be automated. For eg downloading the appropriate Java JDK. What will be good to know is, can you guys share how do you normally copy files to laptops on your restricted environment without internet? What OS do you use is such environments? This will be helpful to shape the approach to make TagUI for Python work offline, including installing without using pip. |
Thanks for the above steps. I'll try that out soon. |
I've tried doing the above steps on my macOS and it works without internet. Refreshing feeling to switch off laptop wifi for the first time in many years. For me, the high user friction part will be step 2 and 3. Delta files are not conveniently downloadable unless download whole tebelorg/Tump repo which is large. Otherwise is clicking to view raw to copy out. Step 3 going to Oracle website with so many options and may need to create ID to download is troublesome, but can't be overridden. Will look out for @ycx91 and @bfgoh inputs on where is the user friction in setting up. So the package can be refined accordingly to minimise user friction in setting up for usage on air-gap envs. (without compromising or inconvenience to the primary users with internet of course). |
Adding on to above comment, @bfgoh setting up TagUI in %temp% folder for Windows is not reliable. Because Windows will periodically delete files from the temp folder and some files in tagui folders will be deleted randomly. That will cause TagUI operation to fail randomly. Not deterministic. Not good. |
I believe that it is an offline init problems for tagui. |
How do you normally install programs and their files into laptops in your company network? TagUI for Python tries to automate the process of downloading the required files instead of users manually downloading and doing the setup. Assuming there is a way to copy files (eg through thumbdrive or some medium), does the following work for your environments?
This will be the easiest way to use in air-gap environments, by using existing TagUI for Python t.init() (which calls t.setup()) to prepare the files on a computer with internet access. Before copying the folder over to the computer with restricted network access. If above works for all the restricted network use cases for 3 of you, then I can create something like t.offline(). Which after running on a computer with internet access, will create a folder or zip folder that you can copy to your restricted computer to use. |
Company has its own IT Center like a cloud center, only can install software it has stored. So I think it is necessary for you to add a .offline() function |
Thanks for your feedback! Oh I don't have customers, TagUI and TagUI for Python are both personal projects that I started to make it easier to do digital process automation. So there is no cost to use or unlock full-features. TagUI is now maintained by AI Singapore, while I maintain TagUI for Python. But yes, a lot of RPA use cases will be in banking & finance. Hi @ycx91 and @bfgoh , let me know if above method (#36 (comment)) works. Then I'll create a new function, maybe call it t.offline() or something. This function will generate a folder or zip file on your computer with internet access. This folder / zip file can then be copied to your company restricted network laptop to use TagUI for Python. |
Adding on that I'm pending inputs from @ycx91 and @bfgoh on whether the 3 steps in #36 (comment) work for your environments. As I can't replicate your air-gap environments to test, I only tested by turning off wifi. But I'll need confirmation that the steps work in your environments before I publish a new release having logic that has not been tested to work correctly. |
Nice seeing you Stamford at Python meetup yesterday! Gotta leave to take care of baby right after that didn't get a chance to talk further with you. (for privacy, no need to reply) |
#36 - add link to license in tagui.py to facilitate air-gap deployments (without internet access to pip) # 50 - add frame() function to access web page frames (supports main frame and sub frame). add popup() function to access webpage popup tabs launched from webpage. #52 - bugfix for snap() and read(), when 'page' is used to mean entire webpage a 'cannot find page' error message appears.
Made commit above to add link to license in tagui.py, as part of facilitating air-gap deployments (without internet access to pip). This will make step 3 above easier by just needing to copy tagui.py - #36 (comment) |
oops, missed out 1 line when pushing previous commit. somehow that line in snap() wasn't selected to push. --- #36 - add link to license in tagui.py to facilitate air-gap deployments (without internet access to pip) #50 - add frame() function to access web page frames (supports main frame and sub frame). add popup() function to access webpage popup tabs launched from webpage. #52 - bugfix for snap() and read(), when 'page' is used to mean entire webpage a 'cannot find page' error message appears.
Added to readme a link to this issue. Making deployments in air-gapped environments (no internet access) have almost 0 user friction is a major goal for this project.
Current iteration of best deployment method -
The magic and details of implementation I'll have to take care. Want to find out base on your environment restrictions, is above plan the best way to deploy? Or is there other best practice your team use to make such deployments as pain-free as possible? |
Greate api, i will try in my company environment and tell you good news later:) |
Thanks @dyywinner! Let me know, if above is a good idea to deploy on environments without internet, or is there an easier way, then I'll go code the pack() and unpack() from feedback. |
Yes, I haven't code it, I'm trying to get feedback what is the best practice for deploying software to air-gapped environment without the internet. It seems like below should be the easiest for users. Let me see if I can work on this over the weekend!
I don't have wechat and don't use facebook, but you can add me on linkedin if you use it - |
Note - if you cannot or do not want to use pack(), you can instead manually download dependencies with these steps Ok implemented in v1.14! Available with To deploy on computers without access to internet -
This feature is still in beta (then in 2019), I'm open to hearing constraints faced by users so that I can improve the feature to work on their environments as best as possible. The goal of this feature is to make deployment as zero friction as possible on air-gapped computers without internet access. There may be some OS-specific dependencies that need separate installation - for eg OpenSSL on macOS, MSVCR110.dll on Windows, or PHP on Ubuntu. If users can suggest ways to install them offline in their environments, I can also look into automating those setup. Note - after deploying to the target computer, if you want to update RPA for Python to a newer version in future, you can use |
Including vcredist_x86.exe as part of pack() to streamline deployment on Windows without internet. This lets users enjoy the automated setup on the air-gapped computer without having to download vcredist_x86.exe elsewhere and transfer the file to that computer to install.
Adding a above commit which Includes vcredist_x86.exe as part of pack() to streamline deployment on Windows without internet. This lets users enjoy automated setup on the air-gapped computer without having to download vcredist_x86.exe elsewhere and transfer to that computer to install. This is now available in RPA for Python v1.21 with |
Closing issue as there are no issues reported for the past 3 months since this new feature. |
Hi,I have met a problem.
The error came in this way: Well as you can see,I am a Chinese which means I am not able to reach some web in the other countries like 'https://www.google.com'.I wonder if that is the problem? |
Hi Crabby, thanks for posting this issue. Are you using your work laptop or personal laptop? The package will automatically download required files hosted on GitHub. For example, https://github.com/tebelorg/Tump/releases/download/v1.0.0/TagUI_Windows.zip Are you able to try on your personal laptop or use VPN to see if your network can have access to let the package download files from GitHub? |
As long as your personal laptop or VPN can have network access for the package to download files, you can use r.pack() function to create a zip file for you to copy to another computer to use there without Internet access. |
Thanks for your response! |
I see.. I'm afraid that the dependency files are hosted on GitHub, if there is no way for you to access the files, then the package can't be used. Can you check with your friends or try some other laptop or VPN, to check if you can have access to these files? On a laptop with access, you can use r.pack() to create a zip to copy to your computer to use. How do you and your friends or colleagues share large files to each other through internet? |
Hi Ken, WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DA6F016100>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/rpa/ Thanks |
Hi Soorej, From the message it looks like there is some firewall or connection issue when you try to use pip to install the package. In that case, it is a firewall or network issue which has to be fixed from your computer network by letting IT administrator open up access to pypi.org and where it hosts package files. This way, you can have a permanent fix for all Python packages. But if you are only concern about RPA for Python, then you can use the pack() and update() function to install this package without internet access and bypass your network firewall restriction - https://github.com/tebelorg/RPA-Python#core-functions Copy the file to the same folder as where you launch |
Hi ken, **Traceback (most recent call last): Process finished with exit code 130 (interrupted by signal 2: SIGINT)** Thanks |
i have used RPA python package on ubuntu lts 18 but i am facing some issues like when called this code i have installed python3.6.9 and java 8 ,PHP on my linux ubuntu environment |
what is means the folder where TagUI for Python will be used? thanks. |
You can use in any folder. Just make sure the rpa.py file is in the same folder as your python script. |
@beAngler and @jituyadav47 sorry I just saw your posts! Did you manage to solve the problems already? |
Now I understand that from tagui.py that it is downloading from
Would it be good to change the code such that it does a check on whether the tagui folder exists and uses the existing folder rather than download a new one?
I ask this because I'm working in an environment where remote host downloading is not allowed, (yay web isolation, no curl either).
So by inspecting the code, I know that this folder is required and I've downloaded manually from https://github.com/tebelorg/Tump/releases/download/v1.0.0/TagUI_Windows.zip
The text was updated successfully, but these errors were encountered: