f5-cloud-libs icon indicating copy to clipboard operation
f5-cloud-libs copied to clipboard

Offline install of f5-cloud-libs

Open foobz opened this issue 7 years ago • 4 comments

Are there any options to install f5-cloud-lib without having an internet access? I can download the f5-cloud-libs.tar.gz and host it on an internal repositories and get it from internal repository and untar when the VE spun up. However, when doing the npm install --production, it need to download all the nodejs dependencies. Does it support offline install (include all the dependencies)? Hasn't test it yet but been thinking of download all the modules and tar in and as part of the install, untar in the directory then runs npm install --production.

foobz avatar Feb 23 '18 02:02 foobz

I don't believe the npm install is actually needed. The tarballs do have all the dependencies and you should just be able to untar them to the appropriate location. What template are you using?

seattlevine avatar Feb 23 '18 04:02 seattlevine

I am not using any HOT template. Basically running the following:-

mkdir /config/cloud curl -ko /config/cloud/f5-cloud-libs.tar.gz --silent --fail --retry 20 -L https://api.github.com/repos/F5Networks/f5-cloud-libs/tarball/develop tar xvzf /config/cloud/f5-cloud-libs.tar.gz -C /config/cloud/ mv /config/cloud/F5Networks-f5-cloud-libs-* /config/cloud/f5-cloud-libs cd /config/cloud/f5-cloud-libs npm install --production

fbchan avatar Feb 23 '18 07:02 fbchan

I don't believe the npm install is actually needed. The tarballs do have all the dependencies and you should just be able to untar them to the appropriate location. What template are you using?

On a newly created Big-IP VE, without running npm install, I'm getting a dependency error when running the onboard script:

[root@node:NO LICENSE:Standalone] cloud # f5-rest-node /config/cloud/f5-cloud-libs-master/scripts/onboard.js \
>  -o /var/log/onboard.log \
>  --host localhost \
>  --user admin \
>  --password admin \
>  --license-pool \
>  --big-iq-host 10.0.0.3 \
>  --big-iq-user admin \
>  --big-iq-password admin \
>  --license-pool-name zzzzzzz
module.js:327
    throw err;
    ^
 
Error: Cannot find module 'q'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/config/cloud/f5-cloud-libs-master/scripts/onboard.js:19:11)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

Does that indicate an npm install is required?

I should add that I'm running BIGIP-13.1.1.2-0.0.4

leonseng avatar Mar 19 '19 04:03 leonseng

Hello, the f5-cloud-libs tar.gz contains all its required dependencies and is expected to be at a certain location for it to be extracted, for example, in an AWS template it would be extracted under /config/cloud/aws/node_modules/f5-cloud-libs/node_modules/f5-cloud-libs

f5-gasingh avatar Apr 15 '19 21:04 f5-gasingh