Giter VIP home page Giter VIP logo

poshnova's Introduction

PoshNova

Current version 0.1

Authors:
Nielsen Pierce ([email protected])
Alexei Andreyev ([email protected])
Don Schenck ([email protected])

Description

PoshNova is a Microsoft PowerShell v3 script module intended for use directly with Rackspace Public Cloud API, which is built on OpenStack.

The primary intention of this project is to provide an easy-to-use tool to manage and automate environments hosted on Rackspace Public Cloud for Windows system administrators, DevOps engineers and developers alike.

The first version of this tool is in very early stages of development and cmdlet names and syntax may change as the tools evolve, so please be aware of this when integrating them into your automation efforts.

###History This effort is a rewrite of Mitch Robin's original PowerClient work, which was originally published on developer.rackspace.com

Installing PoshNova

PoshNova is installed just like any other PowerShell module either in the system-wide module directory or user's home profile.

Preparation

  • Ensure that Windows Management Framework 3.0 (or newer) is installed on your machine, which includes PowerShell 3.0. To determine which version of Windows Management Framework is installed, open PowerShell and execute the following command and look for the value assigned to "WSManStackVersion"

    $PSVersionTable

  • Determine the location of the curent users's Documents folder by executing the following PowerShell command:

    [Environment]::GetFolderPath("mydocuments")

  • Powershell Execution Policy must be set to RemoteSigned or Unrestricted (The module is unsigned at this time). Which setting you should use is based on the location of the "Documents" folder assigned to the current system user:

  • If the Documents folder resides on local storage (e.g. C:\Users\foo\Documents):

    Set-ExecutionPolicy RemoteSigned

  • If the Documents folder resides on networked storage:

    Set-ExecutionPolicy Unrestricted

  • Note: The above policy settings are quite permissive, so feel free to modify these to fit in your environment. See help about_Execution_Policies for full details on this.

Install process

  1. Copy all of the scripts in the module to %USERPROFILE%\Documents\WindowsPowerShell\Modules\PoshNova\. If %USERPROFILE%\Documents\WindowsPowerShell does not exist, execute the following command in a Powershell console:

    New-item –type file –force $profile

  2. Update CloudAccounts.csv file with your Cloud credentials:

    • CloudName - User-defined name for the account for easy identification (used as input for -Account parameter)
    • CloudUsername - Your Rackspace Cloud username
    • CloudAPIKey - Cloud API key
    • CloudDDI - Cloud account number
    • Region - Default region for this account, example: LON, DFW, ORD, SYD or HKG (At this time, LON region is the only one that cannot be overridden at this time)

    Example of CloudAccounts.csv format (included with the module):

    AccountName,CloudUsername,CloudAPIKey,CloudDDI,Region
    dummy1,clouduser,a3s45df6g78h9jk098h7g6f5d4s4d5f5,12345678,LON
    dummy2,dummyuser,a3s45df6g78h9jk098h7g6f5d4s4d5f6,87654321,dfw
    
  3. Either open a new PowerShell session and enter one of the PoshNova cmdlets to load the module dynamically or type the following to load PoshNova module in an existing session to start managing your Rackspace cloud environment:

    Import-Module PoshNova

Getting Help

We aim to include help content for each cmdlet in PoshNova, so you should be able to type the following into a PS session (after the module is imported of course) and get details on how to use that specific cmdlet:

Get-Help PoshNova-cmdletName

If you find incomplete or inaccurate information, please raise this with the team and we will correct it.

Supported Cloud Services

Initial release has been tested to work with the following services, using the detailed cmdlets (use the Get-Help cmdlet_name to see more detailed usage information):

  • CloudIdentity
    • Get-CloudIdentityUsers
    • Get-CloudIdentityRoles
    • Get-CloudIdentityUser
    • Get-CloudIdentityUserRoles
    • New-CloudIdentityUser
    • Remove-CloudIdentityUser
    • Edit-CloudIdentityUser
    • Add-CloudIdentityRoleForUser
    • Remove-CloudIdentityRoleForUser
  • CloudServers
    • Get-CloudLimits
    • Get-CloudServerImages
    • Get-CloudServerFlavors
    • Add-CloudServer
    • Get-CloudServers
    • Get-CloudServerDetails
    • Add-CloudServerImage
    • Remove-CloudServerImage
    • Get-CloudServerBlockVols
    • Update-CloudServer
    • Restart-CloudServer
    • Remove-CloudServer
    • Set-CloudServerRescueMode
  • CloudNetworks
    • Get-CloudNetworks
    • Add-CloudNetwork
    • Remove-CloudNetwork
    • Connect-VirtualInterface
    • Disconnect-VirtualInterface
    • Get-VirtualInterfaces
  • CloudBlock Storage
    • Get-CloudBlockStorageTypes
    • Get-CloudBlockStorageVolList
    • Get-CloudBlockStorageVol
    • Add-CloudBlockStorageVol
    • Remove-CloudBlockStorageVol
    • Get-CloudBlockStorageSnapList
    • Get-CloudBlockStorageSnap
    • Add-CloudBlockStorageSnap
    • Remove-CloudBlockStorageSnap
    • Mount-CloudBlockStorageVol
    • Dismount-CloudBlockStorageVol
  • Cloud LoadBalancers
    • Add-CloudLoadBalancer
    • Add-CloudLoadBalancerACLItem
    • Add-CloudLoadBalancerConnectionLogging
    • Add-CloudLoadBalancerConnectionThrottling
    • Add-CloudLoadBalancerContentCaching
    • Add-CloudLoadBalancerHealthMonitor
    • Add-CloudLoadBalancerNode
    • Add-CloudLoadBalancerSessionPersistence
    • Add-CloudLoadBalancerSSLTermination
    • Get-CloudLoadBalancerACLs
    • Get-CloudLoadBalancerAlgorithms
    • Get-CloudLoadBalancerDetails
    • Get-CloudLoadBalancerHealthMonitor
    • Get-CloudLoadBalancerNodeEvents
    • Get-CloudLoadBalancerNodeList
    • Get-CloudLoadBalancerProtocols
    • Get-CloudLoadBalancers
    • Get-CloudLoadBalancerSSLTermination
    • Remove-CloudLoadBalancer
    • Remove-CloudLoadBalancerACL
    • Remove-CloudLoadBalancerACLItem
    • Remove-CloudLoadBalancerConnectionLogging
    • Remove-CloudLoadBalancerConnectionThrottling
    • Remove-CloudLoadBalancerContentCaching
    • Remove-CloudLoadBalancerHealthMonitor
    • Remove-CloudLoadBalancerNode
    • Remove-CloudLoadBalancerSessionPersistence
    • Remove-CloudLoadBalancerSSLTermination
    • Update-CloudLoadBalancer
    • Update-CloudLoadBalancerConnectionThrottling
    • Update-CloudLoadBalancerNode
    • Update-CloudLoadBalancerSessionPersistence
    • Update-CloudLoadBalancerSSLTermination

The tools are being constantly expanded to work with more Rackspace Public Cloud services, so check back frequently. Alternatively, you can follow the progress by watching it on GitHub at https://github.com/rackerlabs/PoshNova.

Issues and getting help

If you have any problems with the tool or would like to improve things, feel free to contact the authors or submit your changes for us to review.

poshnova's People

Contributors

donschenck avatar jnoller avatar leshkinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poshnova's Issues

Update-CloudServers -updatedminPassword fails

Unable to change admin password, following error:

You cannot call a method on a null-valued expression.
At C:\Users\nielsen.pierce\Documents\WindowsPowerShell\Modules\poshnova\PoshNova.psm1:200 char:35

  • write-host "Exception Type: $($_.Exception.GetType().FullName) `n" -Foregrou ...
    
  •                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Creating new users - Identity URI generation for UK accounts

From: Steve Conisbee
Sent: 30 April 2014 08:54
To: Alexei Andreyev
Subject: PoshNova new-cloudidentityuser

Morning Alexei,

I can’t find my password for Git at the moment so I thought I would drop you an email. I was playing around with PoshNova again. Testing this against my UK account.

When trying to create a new user it was failing and I have fixed it. In the PoshNova.psm1 the identity service URI doesn’t specify the $URIRegion variable in the output which I believe will work OK for US accounts as the URI doesn’t include the Region code, however for UK accounts it does need the LON region code.

}
"identity" {
$CloudURI = "https://" + $URIRegion + "." + $ServiceName + ".api.rackspacecloud.com/v2.0/"
break;
}

It works for me like this but I suspect it will now not work for US accounts so you might want to look at this at some stage.

Just thought you might like to know.

Cheers
Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.