Skip to content

Commit a849d65

Browse files
Merge pull request #346 from jpogran/GH-340-pdk-documentation
(GH-354) Document PDK as source information
2 parents 750b067 + 1e8dd89 commit a849d65

File tree

1 file changed

+91
-5
lines changed

1 file changed

+91
-5
lines changed

README.md

Lines changed: 91 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
## Quick start
4040

41-
- Step 1: Install a supported version of Puppet on your system (see [Requirements](#requirements) for more information).
41+
- Step 1: Install a supported version of the Puppet Development Kit on your system (see [Requirements](#requirements) for more information).
4242
- Step 2: Install the Puppet [extension](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode) for Visual Studio Code.
4343
- Step 3: Open or create a Puppet manifest file (a file with a `.pp` or `.epp` extension or named `Puppetfile`) and start automating!
4444

@@ -65,7 +65,17 @@ This extension provides full Puppet Language support for [Visual Studio Code](ht
6565

6666
## Requirements
6767

68-
You will need to have Puppet Agent installed in order to fully use this extension. You can find instructions and installation links here:
68+
You will need to have the [Puppet Agent](https://puppet.com/docs/puppet/4.10/about_agent.html) or [Puppet Development Kit (PDK)](https://puppet.com/docs/pdk/1.x/pdk.html) installed in order to fully use this extension.
69+
70+
**Note:** PDK version 1.5.0 or higher is required.
71+
72+
You can find instructions and installation links here:
73+
74+
### PDK
75+
76+
* [Download page](https://puppet.com/download-puppet-development-kit)
77+
78+
### Puppet-Agent
6979

7080
* [Windows](https://docs.puppet.com/puppet/latest/install_windows.html)
7181
* [MacOSX](https://docs.puppet.com/puppet/latest/install_osx.html)
@@ -183,15 +193,91 @@ Settings:
183193

184194
You can install the official release of the Puppet extension by following the steps in the [Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/extension-gallery). In the Extensions pane, search for "puppet-vscode" extension and install it there. You will get notified automatically about any future extension updates!
185195

186-
You can also install the extension without access to the internet byw following these [instructions](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix.)
196+
You can also install the extension without access to the internet by following these [instructions](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix.)
197+
198+
## Configuration
199+
200+
The Puppet VSCode extension can use the PDK or the Puppet Agent to provide advanced features, which can be set using two configuration options: `puppet.installType` and `puppet.puppetAgentDir`.
201+
202+
- By default the `puppet.installType` is set to `agent`, and allows you to choose to use `pdk` or `agent`.
203+
- The `puppet.puppetAgentDir` allows you to choose a custom path to either a PDK install or a Puppet-Agent install, and must match the correct setting in `puppet.installType`.
204+
205+
If no settings are chosen, the extension will attempt to use the Puppet Agent, to force it to use the PDK you have to select `pdk` for `puppet.installType`.
206+
207+
208+
**Note**: The `puppet.puppetAgentDir` setting name will be changed in the `0.12.0` release to `puppet.installDirectory`
209+
210+
**Note**: Only PDK v1.5.0 and above are supported.
211+
212+
### Configure extension to use PDK
213+
214+
To ensure that the extension uses the PDK, set the `puppet.installType` setting to the `pdk` value like so:
215+
216+
```json
217+
{
218+
"puppet.installType":"pdk"
219+
}
220+
```
221+
222+
The default installation paths stored in the extension are:
223+
224+
```json
225+
{
226+
// Windows
227+
"puppet.puppetAgentDir":"C:\\Program Files\\Puppet Labs\\DevelopmentKit",
228+
// Mac
229+
"puppet.puppetAgentDir":"/opt/puppetlabs/pdk",
230+
// Linux
231+
"puppet.puppetAgentDir":"/opt/puppetlabs/pdk"
232+
}
233+
```
234+
235+
To use a custom install path for the PDK, set the `puppet.puppetAgentDir` setting to the path you installed the PDK to:
236+
237+
```json
238+
{
239+
"puppet.puppetAgentDir":"D:/programs/pdk"
240+
}
241+
```
242+
243+
### Configure extension to use Puppet-Agent
244+
245+
To ensure that the extension uses the Puppet-Agent, set the `puppet.installType` setting to the `puppet` value like so:
246+
247+
```json
248+
{
249+
"puppet.installType":"puppet"
250+
}
251+
```
252+
253+
The default installation paths stored in the extension are:
254+
255+
```json
256+
{
257+
// Windows
258+
"puppet.puppetAgentDir":"C:\\Program Files\\Puppet Labs\\Puppet",
259+
// Mac
260+
"puppet.puppetAgentDir":"/opt/puppetlabs",
261+
//Linux
262+
"puppet.puppetAgentDir":"/opt/puppetlabs"
263+
}
264+
```
265+
266+
To use a custom install path for the Puppet-Agent, set the `puppet.puppetAgentDir` setting to the path you installed the Puppet-Agent to:
267+
268+
```json
269+
{
270+
"puppet.puppetAgentDir":"D:/programs/puppet"
271+
}
272+
```
187273

188274
## Experience a Problem?
189275

190276
### Puppet Agent Install
191277

192-
A commonly encountered problem is not having Puppet Agent installed on the computer you are running VSCode on. As noted in the [Requirements section](https://github.com/lingua-pupuli/puppet-vscode/blob/master/README.md#requirements), you will need to have Puppet Agent installed in order to fully use this extension, as the extension uses the Puppet binaries and the Ruby language bundled into the agent install in order to function.
278+
A commonly encountered problem is not having the PDK or Puppet Agent installed on the computer you are running VSCode on. As noted in the [Requirements section](https://github.com/lingua-pupuli/puppet-vscode/blob/master/README.md#requirements), you will need to have the PDK or Puppet Agent installed in order to fully use this extension, as the extension uses the Puppet binaries and the Ruby language bundled into the PDK or agent install in order to function.
193279

194-
If you are receiving an error right after opening a Puppet file saying that a Puppet Agent install could not be found, ensure that Puppet is installed on the system. The VSCode extension attempts to find a valid Puppet install if a path is not configured in `puppet.puppetAgentDir` in `User Settings`, so if Puppet is installed but not in a default path please check that your setting points to the correct path.
280+
If you are receiving an error right after opening a Puppet file saying that a Puppet Agent install could not be found, ensure that Puppet is installed on the system. The VSCode extension attempts to find a valid Puppet install if a path is not configured in `puppet.installDirectory` in `User Settings`, so if Puppet is installed but not in a default path please check that your setting points to the correct path.
195281

196282
### Reloading the Puppet VSCode extension
197283

0 commit comments

Comments
 (0)