Newcomer questions about problems on Windows.

19 views
Skip to first unread message

Oleksandr Gavenko

unread,
Sep 20, 2017, 3:54:47 PM9/20/17
to help-cfengine
I am evaluating CFEngine.

Working on company that relays on Microsoft solutions I tried to install cfengine on my laptop Windows 10 with:

https://cfengine.com/product/cfengine-enterprise-free-25/
https://cfengine-package-repos.s3.amazonaws.com/enterprise/Enterprise-3.10.2/agent/windows_x86_64/cfengine-nova-3.10.2-x86_64.msi

I started with simple policy:

  body common control
  {
    bundlesequence => { "hello_world" };
  }

  bundle agent hello_world
  {
    reports:
      any::
        "Hello World!";
  }

but I got

   $ cf-agent -KIf hello.cf
   error: Could not open registry log key
   error: Could not check for logging key in registry
   error: Unable to make directory: C:\Program Files\Cfengine\bin (mkdir: Access is denied.)
   error: Unable to make directory: C:\Program Files\Cfengine\outputs (mkdir: Access is denied.)
   error: Unable to make directory: C:\Program Files\Cfengine\lastseen (mkdir: Access is denied.)
   error: Unable to make directory: C:\Program Files\Cfengine\reports (mkdir: Access is denied.)
   error: Unable to make directory: C:\Program Files\Cfengine\state (mkdir: Access is denied.)
   error: Fatal CFEngine error:  No access to WORKSPACE/outputs dir

even that I installed MSI package as:

  msiexec TARGETDIR=c:\opt\cfengine /a cfengine-nova-3.10.2-x86_64.msi

Previously I installed to default C:\Program Files\Cfengine and I know that C:\Program Files\ is a subject of special permissions from Windows, I tried to install it to another place.

Also c:\Program Files\Cfenginelog folder was created. I don't like to have logs inside package paths. Is there a way to configure that place?

Oleksandr Gavenko

unread,
Sep 20, 2017, 3:58:26 PM9/20/17
to help-cfengine

On Wednesday, September 20, 2017 at 10:54:47 PM UTC+3, Oleksandr Gavenko wrote:
Previously I installed to default C:\Program Files\Cfengine and I know that C:\Program Files\ is a subject of special permissions from Windows, I tried to install it to another place.

Forgot to add that with default path it reported problems with registry key:

   error: Could not open registry log key
   error: Could not check for logging key in registry

and reported problem with chmod on some directories in C:\Program Files\Cfengin...

Aleksey Tsalolikhin

unread,
Sep 21, 2017, 12:31:08 AM9/21/17
to Oleksandr Gavenko, help-cfengine
Hi Oleksandr and welcome to CFEngine!  

Are you running CFEngine as Administrator?  It requires Administrator-level access to manage the system.

I just installed it on Windows Server 2012R2 and it works:


------
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>cf-agent -V
CFEngine Core 3.10.2
CFEngine Enterprise 3.10.2

C:\Users\Administrator>cf-agent -f ./test.cf -b test
R: hello world

C:\Users\Administrator>more test.cf
bundle agent test {

reports:
  "hello world";

}

C:\Users\Administrator>


------

> Also c:\Program Files\Cfenginelog folder was created. I don't like to have logs inside package paths. Is there a way to configure that place?

Yes, I see this too.  I wouldn't think so, there is nothing in https://docs.cfengine.com/docs/3.10/guide-introduction-directory-structure.html about being able to change it...

Let me know if you need any other help with your evaluation.

Best,
Aleksey

-- 
Achieve real learning.  Email trai...@verticalsysadmin.com.

Oleksandr Gavenko

unread,
Sep 21, 2017, 7:50:32 AM9/21/17
to help-cfengine
On Thursday, September 21, 2017 at 7:31:08 AM UTC+3, Aleksey Tsalolikhin wrote:
Hi Oleksandr and welcome to CFEngine!  

Are you running CFEngine as Administrator?  It requires Administrator-level access to manage the system.

No, when I started from Administrator (Win key, then search for Cygwin terminal, then Ctrl+Shift+Enter)  it started working. 

C:\Users\Administrator>cf-agent -f ./test.cf -b test
R: hello world

C:\Users\Administrator>more test.cf
bundle agent test {

reports:
  "hello world";
}

Got it!
 
> Also c:\Program Files\Cfenginelog folder was created. I don't like to have logs inside package paths. Is there a way to configure that place?

Yes, I see this too.  I wouldn't think so, there is nothing in https://docs.cfengine.com/docs/3.10/guide-introduction-directory-structure.html about being able to change it...

Let me know if you need any other help with your evaluation.

I found that even if cfengine installed into different directory it still looked to c:\Program Files\Cfengine and Cfenginelog. I did that with "msiexec /a. Needed to reinstall to default path in order to make it working.

I am currently interesting in provisioning of Vagrant boxes but ultimately interesting in automating release pipeline, I saw "Continuous deployment with CFEngine":


It was great but many low level details was hidden. I'll try to make something like that in my spare time (Jenkins builder, Java apps should be hosted on Windows).

Aleksey Tsalolikhin

unread,
Sep 21, 2017, 11:22:46 AM9/21/17
to Oleksandr Gavenko, help-cfengine
Great, glad you got it going as Administrator, well done.

Got it that it did not like running out of a different directory.

I'm actually teacing an introductory course on CI/CD tonight in Los Angeles, it's my practice run before teaching it at Ohio Linux Fest at the end of the month, and then again at USENIX LISA conference at the end of October.

Nice to hear you've got spare time, I think I remember it.  =)

How many servers are you managing, Oleksandr?

Yours,
Aleksey

-- 
Achieve real learning.  Email trai...@verticalsysadmin.com.

--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengine+unsubscribe@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages