Sha256: a878896fb1af667a46fa7a77920672681b7535865d93b3059c5f80ef3ac6ab51
Contents?: true
Size: 893 Bytes
Versions: 1
Compression:
Stored size: 893 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rancher-management_api-0.1.1 | README.md |