This message was deleted.
# puppet-enterprise
s
This message was deleted.
b
did you configure a control repo?
t
Yes.
Not sure if it has to do with the webhook settings
b
I don't think so, since you deploy via the CLI
did you configure
puppet_enterprise::profile::master::r10k_remote
?
t
Will that be in the console?
b
and can you show
puppet code status && puppet code print-config
you can configure that via hiera or in the console
t
I am able to show
puppet code status && puppet code print-config
and the it shows that it is running.
We have an old puppet setup and
puppet_enterprise::profile::master::r10k_remote
is not setup but code deploy is working fine.
b
which PE version is that?
t
2019.8.11 LTS
b
how is code-manager working without the remote 🤔
can you share the
/opt/puppetlabs/server/data/code-manager/r10k.yaml
?
t
Copy code
cachedir: /opt/puppetlabs/server/data/code-manager/git
forge: {baseurl: '<https://forgeapi.puppetlabs.com>'}
git:
  repositories: []
  provider: rugged
deploy:
  purge_levels: [deployment, environment, puppetfile]
  purge_allowlist: [.resource_types]
  exclude_spec: true
pool_size: 4
sources: {}
v
It can work without remote, let me sanitize the exampe
t
That output is different from our old puppet setup
v
Copy code
puppet_enterprise::master::code_manager::invalid_branches: correct
puppet_enterprise::master::code_manager::private_key: /etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa
puppet_enterprise::master::code_manager::sources:
  unix:
    remote: "<mailto:git@git.example.com|git@git.example.com>:it/puppet/puppet-control.git"
  windows:
    remote: "<mailto:git@git.example.com|git@git.example.com>:it/puppet/puppet-win.git"
    prefix: true
  default:
    remote: "<mailto:git@git.example.com|git@git.example.com>:it/puppet/puppet-pe_bootstrap.git"
    prefix: true
puppet_enterprise::master::code_manager::timeouts_sync: 600
He is my setup, I use three control repositories there
b
my example:
Copy code
sources:
  puppet: {remote: 'git@github.com:bastelfreak/controlrepo.git', basedir: /etc/puppetlabs/code-staging/environments, invalid_branches: error}
cachedir: /opt/puppetlabs/server/data/code-manager/git
forge: {baseurl: '<https://forgeapi.puppetlabs.com>'}
git:
  private_key: /etc/puppetlabs/puppetserver/ssh/id_ed25519
  repositories: []
  provider: rugged
deploy:
  purge_levels: [deployment, environment, puppetfile]
  purge_allowlist: [.resource_types]
  exclude_spec: true
pool_size: 4
@tenajsystems your sources hash is empty. the code manager doesn't know which controlrepo(s) it should deploy
t
So, I have the sources setup in hiera
But when I run puppet the output of
/opt/puppetlabs/server/data/code-manager/r10k.yaml
is still the same as what I posted
b
did you verify the data with
puppet lookup..
? does the server actually get the hiera entry?
t
Let me check.
It's been a while. How would the puppet lookup syntax look like?
v
Copy code
puppet_enterprise::profile::master::code_manager_auto_configure: true
this too this
t
Yeah, that is setup in the console.
I think I figured out the issues. The yaml file I created for the settings had the wrong server name.
so I had it in data/nodes
so the node names needed to match the server names itself.
It had the names from our old setup LOL
v
use roles
b
for such settings it's a good idea to map on roles, not certnames 🙂
💯 1
✔️ 2
t
How would I go about doing that?
b
"it depends" 😄
depends on how you assign roles / if you even use the roles/profiles pattern
usually it's an identifier for a group of servers that do the same thing
often that's done by a fact (bad) or by embedded data in the certificate (good)
t
Is there a documentation I can reference on how to go about it?
t
The way I have it setup now came from recommendation from puppet support. 🙂
v
what puppet support think is not set in stone 🙂
it evolves
t
Hahaha. I will take a look. Once again, that you for the help and assistance.
b
also it's possible that there was a reason for this specific recommendation. We don't know many details about your setup
t
Hmm, after fixing the hiera file name and running puppet, the settings got applied and I am able to run the puppet-code deploy which is now successful but when I check
cat /opt/puppetlabs/server/data/code-manager/r10k.yaml
the output is still the same as what I posted. I'm I missing something?
Never mind, I think I found my problem.
v
Give me enough time, I find answers to all my tickets 🙂