Sha256: 78d43762c16fdf03ff078f0e00db1e1e513c0fafd4a907324b7449a2261739df

Contents?: true

Size: 858 Bytes

Versions: 3

Compression:

Stored size: 858 Bytes

Contents

# Rancher::ManagementApi Gem

## Usage

1. Create a manager:

    a. If your Rancher has access control:
    ```ruby
    manager = Rancher::ManagementApi::Token.build_manager(
      host: "http://localhost:8080",
      username: "youruser",
      password: "yourpassword"
    )
    ```

    b. Or just create a manager:
    ```ruby
    manager = Rancher::ManagementApi::Manager.new(
      host: "http://localhost:8080",
    )
    ```
        
2. Create a project (known in the UI as an Environment):
    ```ruby
    project = manager.create_project("my environment name")
    ```

3. Create a new API key:
    ```ruby
    api_key = project.create_api_key("my api key name")
    ```

4. Save your api_key's secret:
    ```ruby
    puts "Your new RANCHER_ACCESS_KEY=#{api_key.publicValue}"
    puts "Your new RANCHER_SECRET_KEY=#{api_key.secretValue}"
    ```

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rancher-management_api-0.3.2 README.md
rancher-management_api-0.3.0 README.md
rancher-management_api-0.2.0 README.md