This post is just a littel review of two docker images that could aid developer and sysadmin to execute scripted task. From sysadmin perspective it doesn’t change a lot from using client installed version of powercli and navicli, but IMHO it could be more confortable in some off-premise scenarios.

Naviseccli

Naviseccli is a linux software; for this reason the porting to container was not much difficult: let’s see my Dockerfile

FROM ubuntu:latest 
MAINTAINER Lino "Jan" Telera <[email protected]>

ADD https://github.com/emc-openstack/naviseccli/raw/master/navicli-linux-64-x86-en-us_7.33.2.0.51-1_all.deb /tmp/naviseccli.deb

RUN dpkg -i /tmp/naviseccli.deb

env PATH /opt/Navisphere/bin/:$PATH

WORKDIR /opt/Navisphere/bin/

Simply lanuch the container with this command:

docker run --rm -i naviseccli -Scope 0 –Address <spa/b ip address> –User <user> –Password <password> getagent

and here’s the result

image

Enjoy and let me know issues and improvements

Powercli

Thanks to William Lam (@lamw) for the porting, there is a vmware official image here: https://hub.docker.com/r/vmware/powerclicore/

In my test I was able to show my vDC hosts including my script in the container execution:

docker run --rm -i -v /c///<dir>//<owercli_script_dir>:/script vmware/powerclicore powershell "& '/script/sample-script.ps1'"

And here my result:

image

Enjoy!

By admin

Utilizzando il sito, accetti l'utilizzo dei cookie da parte nostra. Using this site you accept cooking utilization. maggiori informazioni more Informations

Questo sito utilizza i cookie per fornire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o cliccando su "Accetta" permetti il loro utilizzo. This site uses cookies to provide the best browsing experience possible. By continuing to use this website without changing your cookie settings or clicking "Accept" allow their use.

Chiudi Close