-
Notifications
You must be signed in to change notification settings - Fork 4
Compile Photon Controller CLI
The easiest way to get started with the Photon Controller CLI client is to download the pre-compiled version. Although you can compile it from the source code if you want, there are a limited number of reasons you would want to go about compiling the binary:
- You like compiling things from source. No problem, we're like that, too.
- You are a developer that's contributing to Photon Controller and added functionality to the CLI that you want to test.
- You've hit a bug and are compiling a newer version with the fix. Please reach out to us, though. We'd be happy to throw the "fixed" compiled binary up on a CDN so that other users don't have to go through the trouble of compiling this by hand if they don't want to.
Still want to compile? Keep reading.
It's best to follow the instructions on the photon-controller-cli repository; the directions on the Photon Controller CLI repository strictly take precedence over the instructions here. But here's a quick rundown of how to build the CLI tools:
- Ensure you have Go installed
- Download and build the Photon CLI:
go get github.com/vmware/photon-controller-cli/photon
If you need to build the CLI against a specific commit you'll have to follow the instructions on the photon-controller-cli repo.
When we spin a release, the accompanying CLI tools will also be released in binary format. There might be changes that break compatibility, so it's best to use the binary we release or ensure that the commit you compile against is compatible.
You can test the binary by running it without any parameters:
% bin/photon
You should then see the photon help
output:
photon -h
NAME:
photon - Command line interface for Photon Controller
USAGE:
photon [global options] command [command options] [arguments...]
VERSION:
Git commit hash: 11f5e4c
COMMANDS:
auth options for auth
system options for system operations
target options for target
tenant options for tenant
host options for host
datastore options for datastore
deployment options for deployment
image options for image
task options for task
flavor options for flavor
project options for project
disk Options for persistent disks
vm options for vm
service, cluster Options for services
router options for router
subnet options for subnet
zone options for zone
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--non-interactive, -n trigger for non-interactive mode (scripting)
--log-file value, -l value write logging information into a logfile at
the specified path
--output value, -o value select output format
--detail, -d print the current target, user, tenant, project
--help, -h show help
--version, -v print the version
Chances are there's something wrong with the way your Go environment was set up. If you're really stuck, ping us on GitHub.
- Home
- Installation Guide
- Download Photon Controller
- Release Notes
- User Guide
- Installation and Setup
- Administration and Operations
- Command-Line Cheat Sheet
- Overview of Commands
- Authenticating Multitenant Users and Groups
- Authorization Model
- Connecting to the Load Balancer and Logging In
- Tenants, Quotas, and Projects
- Creating Tenants, Projects, and Quotas
- Working with Tenants
- Creating a Project
- Uploading Images
- Creating Images
- Replicating Images in Datastores
- Creating Flavors
- Working with Virtual Machines
- Using a Photon OS VM
- Creating a Network
- Performing Host Maintenance
- Working with ESXi Hosts
- Configuring Your Own Load Balancer
- Troubleshooting
- Deploying Clusters
- Integration
- API
- Information for Developers
- References
- Legal