Code Monkey home page Code Monkey logo

Comments (8)

fschulze avatar fschulze commented on July 23, 2024

Yes, installing ploy_ansible 1.3.0 should fix that, or downgrading ansible to 1.8.x.

from bsdploy.

mzs114 avatar mzs114 commented on July 23, 2024

ok, I got the new version of ploy_ansible installed.

% pkg info py27-ploy_ansible-1.3.0
py27-ploy_ansible-1.3.0
Name           : py27-ploy_ansible
Version        : 1.3.0

That was on the client.
The target is a new stock installed FreeBSD on a new VM. On which I installed python2.7, copied the ssh public keys and I am able ssh without password.

But ploy ssh , configure fails.

% ploy configure jailhost

PLAY [jailhost] *************************************************************** 

GATHERING FACTS *************************************************************** 
ERROR: Failed to connect to plain-instance:jailhost (192.168.56.110)
ERROR: username: 'root'
ERROR: port: 22
fatal: [jailhost] => Couldn't validate fingerprint for 'ez-master:jailhost': No fingerprint set in config.

TASK: [jails_host | bind host sshd to primary ip] ***************************** 
FATAL: no hosts matched or all hosts have already failed -- aborting


% ploy ssh jailhost
ERROR: Failed to connect to plain-instance:jailhost (192.168.56.110)
ERROR: username: 'root'
ERROR: port: 22
ERROR: Couldn't validate fingerprint for ssh connection.
ERROR: No fingerprint set in config.
ERROR: Is the instance finished starting up?

I copied RSA fingerprint in the config, the finger print is of the target FreeBSD VM.
I also tried copying the ECDSA finger print, it failed both times.

cat etc/ploy.conf 

[ez-master:jailhost]
ip = 192.168.56.110
user = root
http_proxy = http://proxy.iiit.ac.in:8080/
bootstrap-fingerprint = d3:60:de:16:94:84:3f:47:7e:aa:c8:32:0c:79:f4:4f
roles = 
 jails_host


ssh-keygen -l -f ~/.ssh/known_hosts
..
2048 d3:60:de:16:94:84:3f:47:7e:aa:c8:32:0c:79:f4:4f fbsd (RSA)

from bsdploy.

mzs114 avatar mzs114 commented on July 23, 2024

Ok, solved it using ploy documentation https://github.com/ployground/ploy

I first removed the passphrase on the private key, thinking this might solve it.
Then set ssh-key-filename, still no go.
Finally observed that there is one more option fingerprint, set it to ignore or the fingerprint of the target and it allowed me to ssh.

The final ploy.conf as it is now:

[ez-master:jailhost]
ip = 192.168.56.110
user = root
http_proxy = http://proxy.iiit.ac.in:8080/
#ssh-key-filename = /home/user/.ssh/id_rsa
fingerprint = 2f:ed:44:0c:1c:21:ef:04:57:86:73:3d:d9:58:b7:68
#bootstrap-fingerprint = d3:60:de:16:94:84:3f:47:7e:aa:c8:32:0c:79:f4:4f
#bootstrap-fingerprint = 2f:ed:44:0c:1c:21:ef:04:57:86:73:3d:d9:58:b7:68
roles =
 jails_host

I was hoping that bsdploy would use the fingerprint from ~/.ssh/know_hosts.

I am concerned that a passphrase protected private key cannot be used.

ploy ssh jailhost
ERROR: Failed to connect to plain-instance:jailhost (192.168.56.110)
ERROR: username: 'root'
ERROR: port: 22
ERROR: Private key file is encrypted
ERROR: Is the instance finished starting up?

from bsdploy.

fschulze avatar fschulze commented on July 23, 2024

Yes, for an existing server you need to provide the fingerprint, as ploy can't know about it. If you follow the quickstart, the ssh host key is generated before and uploaded to the VM during bootstrap. That's why ploy knows the fingerprint.

Private keys with passphrase do work. The error message is misleading, but not under our control. My ssh key has a passphrase unlocked via my OS X keychain. There might be issues with entering the passphrase if you need a terminal for it, not sure about that, since on OS X I get a dialog popup.

from bsdploy.

mzs114 avatar mzs114 commented on July 23, 2024

Thanks, I am trying these from a FreeBSD machine.

I am now stuck at this.

% ploy configure jailhost

TASK: [jails_host | Setup data zpool] ***************************************** 
failed: [jailhost] => {"failed": true}
msg: Don't know how to handle 0 number of devices ().

FATAL: all hosts have already failed -- aborting

The corresponding task in the playbook jails_host/tasks/main.yml is:

- name: Setup data zpool
  zpool:
    name: "{{ ploy_bootstrap_data_pool_name }}"
    geli: "{{ ploy_bootstrap_geli|bool }}"
    version: "{{ ploy_bootstrap_zpool_version }}"
    devices: "{{ ploy_bootstrap_data_pool_devices }}"
    raid_mode: "{{ ploy_bootstrap_raid_mode }}"
  register: data_pool_result

As I am directly configuring without bootstrapping, how do I pass these?

from bsdploy.

fschulze avatar fschulze commented on July 23, 2024

You have to set bootstrap-data-pool-name to your ZFS pool in ploy.conf. ZFS is a requirement for bsdploy. We normally setup a smaller (~10GB) system partition and use the rest of the hdd as the data pool.

from bsdploy.

mzs114 avatar mzs114 commented on July 23, 2024

Thank you for bearing with me, I finally got it configured.
Sent some pull requests on what I think are improvements.
I now need to figure out how to populate the host with jails. I will also contrast this with the bootstrapping process with a mfsBSD image.

A suggestion: listing and describing these internally used options will really help.
I could not find bootstrap-data-pool-name anywhere in the documentation.

from bsdploy.

fschulze avatar fschulze commented on July 23, 2024

Yes, the documentation is still behind. We improve it gradually and try to only add new features if they are documented to not fall behind even further.

from bsdploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.