blob: d32c73fd9272f408d3d2513db1e925ac5dcbe2d2 [file] [view]
---
section: Localhost
section_position: 11
section_type: inline
---
### Localhost
If passwordless ssh login to `localhost` and passwordless `sudo` is enabled on your
machine, you should be able to deploy some blueprints with no special configuration,
just by specifying `location: localhost` in YAML.
For example:
{% read snippets/_location-localhost.camp.md %}
If you use a passphrase or prefer a different key, these can be configured as follows:
location:
localhost:
privateKeyFile=~/.ssh/brooklyn_key
privateKeyPassphrase=s3cr3tPASSPHRASE
Alternatively, you can create a specific localhost location through the location wizard tool available within the web console.
This location will be saved as a [catalog entry](/guide/blueprints/catalog#locations-in-the-catalog)
for easy reusability.
#### Passwordless Sudo
If you encounter issues or for more information, see [SSH Keys Localhost Setup](#localhost-setup).
For some blueprints, passwordless sudo is required. (Try executing `sudo whoami` to see if it prompts for a password.
To enable passwordless `sudo` for your account, a line must be added to the system `/etc/sudoers` file.
To edit the file, use the `visudo` command:
{% highlight bash %}
sudo visudo
{% endhighlight %}
Add this line at the bottom of the file, replacing `username` with your own user:
{% highlight bash %}
username ALL=(ALL) NOPASSWD: ALL
{% endhighlight %}
If executing the following command does not ask for your password, then `sudo` has been setup correctly:
{% highlight bash %}
sudo whoami
{% endhighlight %}