How to install the DAML SDK in a Ubuntu VM, which doesn't have the internet connection? - daml

Unable to install the "da-cli-114-7582c1a0bd-linux.run" file in my Ubuntu VM. The setup is failing while checking the latest version check.
I have downloaded the latest DAML SDK setup file "da-cli-114-7582c1a0bd-linux.run" and copied the same into my Ubuntu VM through local network connection. When I try to install the .run file, the setup trying to connect to the internet for latest version check. But I am not allowed to use internet in the application servers/VMs. Because of this restriction the setup is getting failed and I am unable to complete the DAML SDK installation.
Is it possible to get the DAML SDK setup as a .tar file? If we have tar file, then it will be easy to complete the setup manually.

Installing the SDK using the .run files in an environment without an internet connection is not easy. It might be possible to install it in an environment with internet and then tar up the folder ~/.da, extract it back into place in the VM and put ~/.da/bin.
However, there is a new SDK assistant in the works (called daml, not da), which can be installed using curl -sSL get.daml.com | sh. If you look at the content of the installation script, you can see that all it really does is downloading a tar-ball from GitHub releases, un-tars it and calls an install.sh script within. That's probably the easier way to get the SDK into an offline environment at this point.
However, the documentation for the new daml assistant is not on docs.daml.com yet. It will be shortly, but in the meantime you can read it on GitHub.

Related

Configure SonarQube (Node.JS) to download binaries from an internal server

What we are trying to do is to get SonarQube to analyze our Typescript (Node.JS) project on a Docker image, but we are running into an error. If it helps, we are trying to use the sonarqube-scanner module from Node.JS.
The error is as encountered below:
[17:57:23] Starting analysis...
[17:57:24] Getting info from "package.json" file
[17:57:24] Checking if executable exists: /root/.sonar/native-sonar-scanner/sonar-scanner-4.5.0.2216-linux/bin/sonar-scanner
[17:57:24] Could not find executable in "/root/.sonar/native-sonar-scanner".
[17:57:24] Proceed with download of the platform binaries for SonarScanner...
[17:57:24] Creating /root/.sonar/native-sonar-scanner
[17:57:24] Downloading from https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip
[17:57:24] (executable will be saved in cache folder: /root/.sonar/native-sonar-scanner)
[91m[18:03:53] [0m[91mERROR: impossible to download and extract binary: connect ETIMEDOUT 91.134.125.245:443
[0m[91m[18:03:53] [0m[91m SonarScanner binaries probably don't exist for your OS (linux).
[0m[91m[18:03:53] In such situation, the best solution is to install the standard SonarScanner (requires a JVM).
[0m[91m[18:03:53] Check it out at https://redirect.sonarsource.com/doc/install-configure-scanner.html
Now if you notice from the error, the binaries server encounters an ETIMEDOUT error, and this is because the server that accesses it comes from an internal network that cannot access external sites.
Would it be possible to configure SonarQube to pull from an internal server? And if so how would we go about configurating this?
Many thanks in advance!
I was able to find documentation through the SonarQube Javascript module here (https://www.npmjs.com/package/sonarqube-scanner)
By default, the scanner binaries are downloaded from https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/. To use a custom mirror, set $SONAR_SCANNER_MIRROR. Or download precise version with $SONAR_SCANNER_VERSION
Example:
export SONAR_SCANNER_MIRROR=https://npm.taobao.org/mirrors/sonar-scanner/
export SONAR_SCANNER_VERSION=3.2.0.1227

How can i install Google Chrome to use with protractor during automation CI run

My organization doesn't have Google Chrome natively installed within the Virtual Machines configured for automation CI and it's not allowed to install Chrome globally on those machines.
We are using protractor for automation of angular apps which goes really well with Google Chrome.
Is it possible to install Google Chrome at runtime for execution locally so that we can have smooth execution on those VM's. If yes what and how can i install chrome.
We are using TeamCity for CI/CD. Please help.
Update 29/12/2019: A suggestion, you containerize your app. Which means you need to include the step of chrome installation on when the image in being built on your VM.
Generally such a step is included in the Dockerfile.
more info on how to write Dockerfile: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
Within your angular app, to handle any browser's binary installation, I include it in package.json inside the scripts section:
"webdriver-update": "./node_modules/protractor/bin/webdriver-manager update --standalone --versions.standalone=3.8.0 --chrome --versions.chrome=76.0.3809.68",
This has worked for me in maintaining the dependency on the chrome versions.

Google Drive API for Objective-C with CocoaPods not linking GTMOAuth2 and

I am trying to incorporate Google Drive API into my Objective-C app. I'm using this link. I setup the quickstart example and that works fine. For my app, I added the API using CocoaPods as directed. When I run the app, I get linker errors not finding GTMOAuth2, GTMSessionFetcher and GoogleAPIClient. Here is one example.
ld: warning: directory not found for option '-L/Users/k/Library/Developer/Xcode/DerivedData/DA/dntvfajcuzknsddygndaenxbqsii/Build/Products/Debug-iphonesimulator/GTMOAuth2'
Under Target->Build settings -> other linker flags
-ObjC -l"GTMOAuth2" -l"GTMSessionFetcher" -l"GoogleAPIClient" -framework "Security" -framework "SystemConfiguration" -lz
for run path search paths, I have #executable/Frameworks
Can some provide info on how to probably setup Xcode so it finds GTMOAuth2, GTMSessionFetcher and GoogleAPIClient that are setup by the CocoaPods.
You may want to try the installation process as discussed in Install a Google SDK using CocoaPods or in Google APIs for iOS which gives the following steps in adding a Google SDK to your iOS app:
CocoaPods is used to install and manage dependencies in existing Xcode projects.
Create an Xcode project, and save it to your local machine.
Create a file named Podfile in your project directory. This file defines your project's dependencies, and is commonly referred to as a Podspec.
Open Podfile, and add your dependencies.
Save the file.
Open a terminal and cd to the directory containing the Podfile.
Run the pod install command. This will install the SDKs specified in the Podspec, along with any dependencies they may have.
Open your app's .xcworkspace file to launch Xcode. Use this file for all development on your app.
Please also check the list of CocoaPods published by Google.
Furthermore, you may want to continue the setup using the approaches to add the library to your project as discussed in this GitHub post such as using GTM OAuth2 or Google Sign-In SDK and adding the framework to an Xcode project.
Lastly, to help you troubleshoot problems during installation, you may visit this guide.

Windows agent missing for zabbix 2.4.7

I want to use zabbix latest version. However, windows agent is missing for zabbix 2.4.7
http://www.zabbix.com/download.php
Please suggest what can be done to get windows agent
If the Windows agent is not available on the official download page, you can check it out from the official repository. There are precompiled agents available for Windows for each release. For instance:
$ svn co svn://svn.zabbix.com/tags/2.4.7/bin
This will give you a directory with precompiled Zabbix 2.4.7 agents for Windows, both 32-bit and 64-bit.
You can always find the latest precompiled Windows binaries inside the full sources package:
just download the archive under Zabbix Sources section here:
http://www.zabbix.com/download.php
Untar the archive and you would find Windows .exe files under bin folder there
Alternatively, you can resort to using this unofficial but very helpful project:
http://www.suiviperf.com/zabbix/index.php
That always has the latest Windows binaries for Zabbix wrapped in msi or exe installer for convenience

Mercurial on Jenkins, installing and configuring

I have a Mercurial repository (on Bitbucket) with some code (Java) and I want to do CI builds on a cloud-based Jenkins server (at Jelastic, running on CentOS). My problem is that I haven't been able to do a proper installation of Mercurial on the Jenkins server.
The Jenkins build fails with the following message:
ERROR: Failed to clone https://bitbucket_jenkins_user:some_password#bitbucket.org/repo_owner/my_repository because hg could not be found; check that you've properly configured your Mercurial installation
Setup information
It's a private Mercurial repository, hosted at Bitbucket
In Bitbucket I have set up a Service to trigger the Jenkins build, after a Push has happened
I have defined a specific bitbucket jenkins user in my Mercurial repository, it has only read rights and it logs in using simple https authentication
Jenkins runs on a Tomcat 7, hosted in a Jelastic cloud environment, on CentOS 6
The Mercurial plugin was installed through the Jenkins interface, by Manage plugins
The build is configured as being triggered remotely (by the service defined in Bitbucket)
Build results are the same when started manually and when triggered from a push to the repository
When I first did this I was under the impression that installing the Mercurial plugin in Jenkins would be enough, that it would also install the needed Mercurial binaries to be able to connect to the repository and get the code. I have realized that I was wrong and that on the Manage Jenkins / Configure System page I need to specify my Mercurial installation.
Questions
Is it possible to create a Mercurial installation without ssh access and doing a "yum install mercurial"?
In the Jenkins interface, what can I specify when choosing the "Install Automatically" option?
When defining an installer, I have experimented with the "Extract zip/tar.gz" option, but what can I write as the "Download URL for binary archive"?
Jenkins also offers an installer option of "Run command". What kind of commands could that be, maybe a "yum install ..." or "rpm ..."?
Since my server is cloud based, getting ssh access is a paid add-on which I would prefer to avoid. But if that is my only option I will of course do it, thereby getting access to running commands on the server. However, running "yum install mercurial" on Centos seems to only give the 1.4 version of Mercurial. Current version when I write this is 2.6.3, would I need to download the sources and compile it myself or is it possible to get that as a binary for Centos somewhere?
The Mercurial Plugin page has a section on how to use the Auto Installation options to install Mercurial using ArchLinux packages.
"The plugin supports generic tool auto-installation methods for your Mercurial installation, though it does not publish a catalog of Mercurial versions. For users of Linux machines (with Python preinstalled), you can use ArchLinux packages. For example, in /configure under Mercurial installations, add a Mercurial installation with whatever Name you like, Executable = INSTALLATION/bin/hg, Install automatically, Run Command, Label = linux (if desired to limit this to slaves configured with the same label), Command = [ -d usr ] || wget -q -O - http://www.archlinux.org/packages/extra/i686/mercurial/download/ | xzcat | tar xvf - (or …/x86_64/… for 64-bit slaves), Tool Home = usr, and configure a job with this installation tied to a Linux slave."
see https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin