Skip to content
Snippets Groups Projects

cloudinit

Merged Andreas Hamacher requested to merge cloudinit into master

Merge request reports

Checking pipeline status.

Approval is optional

Merged by Trung NguyenTrung Nguyen 4 years ago (Sep 21, 2020 7:12am UTC)

Merge details

  • Changes merged into master with b3238a7b (commits were squashed).
  • Deleted the source branch.

Pipeline #12034 failed

Pipeline failed for b3238a7b on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @handreas home directory of ec2-user should be local_home

    [ec2-user@m3-login2 ~]$ pwd /local_home/ec2-user

  • Author Contributor

    @tngu0050 ...not during cloud init. this is at the creation time of the VM local home comes into play via ansible. this is before ansible

    openstack server create --wait --flavor mon.c36r170.numa.mlx --key-name hpc  \
    --availability-zone monash-03:...l.. \
    .....
    --security-group default --security-group NFS --user-data=cloudinit.sh \
    --property ansible_host_groups='["ComputeNodes"]' --property ansible_user='ec2-user' --property project_name='m3test4' \
    fancyVMname
  • merged

  • Trung Nguyen mentioned in commit b3238a7b

    mentioned in commit b3238a7b

  • I don't think you should make assumptions about what the homedir is at the time cloudinit runs. I use the following #!/bin/bash whoami sed -i 's/^ssh/cert-authority ssh/' /home/ec2-user/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /local_home/ec2-user/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /home/ubuntu/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /local_home/ubuntu/.ssh/authorized_keys exit 0 personally, so the same userdata can be applied on m3, non-m3 centos and ubuntu

Please register or sign in to reply
Loading