Skip to content
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

New commands to edit app design and publish changes to cloud #128

Open
ryran opened this issue Feb 11, 2017 · 3 comments
Open

New commands to edit app design and publish changes to cloud #128

ryran opened this issue Feb 11, 2017 · 3 comments
Assignees

Comments

@ryran
Copy link
Owner

ryran commented Feb 11, 2017

The first one:

  • /apps/APP/ publish_design_updates
    • publish changes to an already-published application

Then here are VM-specific commands:

  • /apps/APP/vms/VM/ delete
    • remove a VM from an app
  • /apps/APP/vms/VM/ nic_edit
  • /apps/APP/vms/VM/ nic_add
  • /apps/APP/vms/VM/ nic_delete
  • /apps/APP/vms/VM/ nic_list
    • list out the networkConnections dict from the VM
  • /apps/APP/vms/VM/ update_from_file
    • reads an input file containing VM design definition and updates VM accordingly
  • /apps/APP/vms/VM/ cloudinit_enable
    • enables or disables Cloud-Init support for a particular VM (the "Cloud Init is installed on this VM" checkbox)
  • /apps/APP/vms/VM/ cloudinit_keypair
    • configure what keypair to use for a VM (Ravello calls these "key pairs" but they're really just ssh pubkeys); keypair must already be on account (add by use of /keypairs/ upload_new_pubkey cmd)
  • /apps/APP/vms/VM/ cloudinit_userdata_from_file
    • reads an input file containing either a shell script or Cloud-Init cfg-data and injects it into the VM

Each of these commands supports a publishUpdates={true|false} option that defaults to true as long as the parent application is already published.

Planned:

  • /apps/APP/vms/VM/ service_{add,delete}
    • this of course would allow adding or removing supplied services (unless someone says they care about required services, which I've never seen the need for)
@ryran
Copy link
Owner Author

ryran commented Feb 14, 2017

Here are the cmds added in v1.16.0:

APP-specific:

publish_design_updates

/apps/myapp_0> help publish_design_updates 

SYNTAX
======
publish_design_updates 


DESCRIPTION
===========

Update the cloud with the latest design updates.

VM-specific:

delete

/apps/myapp_0/vms/rhel7-base> help delete 

SYNTAX
======
delete [noconfirm] [publishUpdates] 


DEFAULT VALUES
==============
noconfirm=false publishUpdates=true 


DESCRIPTION
===========

Delete a VM from the application design.

If application is already published, and *publishUpdates* is 'true'
(default), the design changes will be immediately published to the
cloud.

nic_edit

/apps/myapp_0/vms/rhel7-base> help nic_edit 

SYNTAX
======
nic_edit [index] [name] [mac] [deviceType] [bootProto] [ip] [mask] [gateway] [dns] [externalAccessState] [publishUpdates] 


DEFAULT VALUES
==============
index=@prompt name=@current mac=@current deviceType=@current bootProto=@current ip=@current mask=@current gateway=@current dns=@current externalAccessState=@current publishUpdates=true 


DESCRIPTION
===========

Edit an existing NIC in the VM design.

All params (except *index*) allow a value of '@current' to make no change.

*index* should be the index number of the existing NIC to edit
    (e.g., '0', '1')
If specified, *mac* should be a valid hexadecimal MAC address with
    6 colon-separated octets
If specified, *deviceType* should be one of:
    e1000
    virtio
    vmxnet3
    pcnet
    rtl8139
    ne2k_pci
    vmxnet
    e1000e
If specified, *bootProto* should be either 'static' or 'dhcp'
If specified, *ip* should be a valid decimal IP address with
    4 dot-separated octets
When using bootProto=static, *gateway* and *dns* are optional and thus
    allow an an additional value of '@clear'; otherwise they should be
    valid decimal IP addresses with 4 dot-separated octets
If specified, *externalAccessState* should be one of:
    CONDITIONAL_PUBLIC_IP
    ALWAYS_PUBLIC_IP
    ALWAYS_PORT_FORWARDING

If application is already published, and *publishUpdates* is 'true'
(default), the design changes will be immediately published to the
cloud.

Feel free to file RFEs for extra things that haven't been implemented.

nic_add

/apps/myapp_0/vms/rhel7-base> help nic_add

SYNTAX
======
nic_add [index] [name] [publishUpdates] 


DEFAULT VALUES
==============
index=@auto name=@auto publishUpdates=true 


DESCRIPTION
===========

Add a new NIC to the VM design.

The *index* controls whether to append the NIC to the end of the list
of existing NICs or to insert it somewhere in the list. By default, the
new NIC will get added to the end, so e.g., on a VM with 2 existing
NICs (index 0 and index 1), the new NIC will be the 3rd and thus will
get index 2. In the same situation, setting index=0 would insert the
new NIC before the other two, changing their index numbers.

*name* -- when not specified -- defaults to 'ethN' where N is the
*index* number.

On creation, the NIC's useAutomaticMac property is set to True and
deviceType is set to virtio. All other values receive their default
settings per the API (e.g., DHCP will be enabled & externalAccessState
will be set to CONDITIONAL_PUBLIC_IP). Use the nic_edit command to make
any customizations.

If application is already published, and *publishUpdates* is 'true'
(default), the design changes will be immediately published to the
cloud.

nic_delete

/apps/myapp_0/vms/rhel7-base> help nic_delete

SYNTAX
======
nic_delete index [publishUpdates] 


DEFAULT VALUES
==============
publishUpdates=true 


DESCRIPTION
===========

Delete an existing NIC from the VM design.

NICs are numbered by *index*, starting at zero.

If application is already published, and *publishUpdates* is 'true'
(default), the design changes will be immediately published to the
cloud.

nic_list

/apps/myapp_0/vms/rhel7-base> help nic_list 

SYNTAX
======
nic_list 


DESCRIPTION
===========

List the NICs from the VM design.

This command is a convenience function to show abbreviated info from
the design aspect of a particular VM. To see full details about a VM,
or to see deployment aspect (cloud) details, or to output to a file,
use the print_def command.

update_from_file

/apps/myapp_0/vms/rhel7-base> help update_from_file 

SYNTAX
======
update_from_file inputFile [publishUpdates] 


DEFAULT VALUES
==============
publishUpdates=true 


DESCRIPTION
===========

Update a VM with design definition imported from json file.

If application is already published, and *publishUpdates* is 'true'
(default), the design changes will be immediately published to the
cloud.

@ryran
Copy link
Owner Author

ryran commented Feb 20, 2017

Here are the cmds added in v1.17.3:

VM-specific:

cloudinit_enable

/apps/myapp_0/vms/rhel7-base> help cloudinit_enable 

SYNTAX
======
cloudinit_enable [enabled] [publishUpdates] 


DEFAULT VALUES
==============
enabled=true publishUpdates=true 


DESCRIPTION
===========

Enable or (disable) Cloud-Init for this VM.

cloudinit_keypair

/apps/myapp_0/vms/rhel7-base> help cloudinit_keypair

SYNTAX
======
cloudinit_keypair [keypair] [publishUpdates] 


DEFAULT VALUES
==============
keypair=@prompt publishUpdates=true 


DESCRIPTION
===========

Configure application to pass a Ravello "Key Pair" (ssh pubkey) to VM.

This requires the VM has Cloud-Init installed.

The latter command automatically enables Cloud-Init, so the first command isn't strictly required.

@ryran
Copy link
Owner Author

ryran commented Mar 2, 2017

Added in v1.19.0:

VM-specific:

cloudinit_userdata_from_file

/apps/myapp_0/vms/rhel7-base> help cloudinit_userdata_from_file

SYNTAX
======
cloudinit_userdata_from_file inputFile [noconfirm] [publishUpdates] 


DEFAULT VALUES
==============
noconfirm=false publishUpdates=true 


DESCRIPTION
===========

Inject Cloud-Init user-data into VM from files.

This requires the VM has Cloud-Init installed.

*inputFile* must be the path to a file containing cloud-config data
("#cloud-config") or a shell script (e.g., "#!/bin/bash").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant