Extend cli capabilities

  • 0
  • 1
  • Idea
  • Updated 2 years ago
  • Planned
Hi,

It will be nice if we can get the cli/API extension to allow engine setup/configuration, this for making some automation and factory setup for huge deployments environment.

Regards,

Mouhssine
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Official Response
Hey Mouhssine, we actually already have this ability today. Other than OS level config (IP and hostname, for example), everything else can be automated. I use expect scripts to automate the OS level config stuff. I will post some code examples for you.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
Hi Adam,

Great, nice to hear that.

I'm working actually on a project I called delphix factory, aiming for automating the engine(s) deployment.

Regards,

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
https://github.com/CloudSurgeon/delphixpy-examples

Check out these files I just posted:
  • engine_setup.py - does the inital setup_wizard config of storage and sysadmin user
  • delphix_admin_setup.py - does the initial config of the delphix_admin user
  • engine_network_assignment -  example of using TCL to configure the network settings and hostname of the engine
These are all actual code pieces that I use in my "Landshark factory" today.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
Hi Adam,

Thanks a lot do sharing, I will give it a look and give you a feedback asap.

Kind Regards,

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Hey Mouhssine, it was also brought to my attention that we should be able to do the stuff in my engine_network_assignment  script via the API now. (/network and /system API's, to be exact). I'll work on an update over the next week and post it.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
Hey,

That i was looking for I posted as looking for cli but was misleading from my part :/

If it's now okay to do it via API it great news will check out tomorrow.

Regards,

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Mouhssine, check my git repo again. You will now find a python version of the tcl script that sets the static IP, dns, default gateway, and hostname. You could combine it with the other two scripts I previously mentioned to do a complete initial engine setup. 
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
Adam,

Many thanks I will try to do a mix with some configuration file to feed scripts.

I'm targeting working on it beginning January 17, I will not hesitate to keep you updated.

Keep rocking

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Yeah. This is what I do in my prime_setup.py script. You can find it in /home/delphix on  the Linux Target of your Landshark environment. I use an XML file, but it could easily be anything.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
Hey,

Just to clarify more the idea.

The delphix engine factory aimes to install and configure from 1 to n engine, just by getting the inputs from a conf file and looping on its content to the deploy the engine(s).

Regards,

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Sure, I get it. I have created a factory here that will create 1 to n Landshark environments in AWS, including a DE, that reads from a configuration blueprint and loops through for n environments. 
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
So,
why reinventing the wheel. It already exists :)
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
:) Perhaps, perhaps not. If you want, I can show you what I have done via WebEx. Perhaps, if nothing else, it can give you some ideas for your initiative.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 5,846 Points 5k badge 2x thumb
With great pleasure for the webex

Your right any way i'm adept of do it to to learn (understand) and things could be somehow specific to my needs