forked from rancher-sandbox/rancherd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rancher#14 from rancher-sandbox/fixups/cloud-init
Cloud init fixups
- Loading branch information
Showing
9 changed files
with
62 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
framework/files/etc/systemd/system/rancherd.service.d/override.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[Unit] | ||
ConditionPathExists=!/run/cos/live_mode | ||
ConditionPathExists=!/run/cos/recovery_mode | ||
After= | ||
After=cos-setup-network.service |
3 changes: 3 additions & 0 deletions
3
framework/files/etc/systemd/system/ros-installer.service.d/override.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Unit] | ||
After= | ||
After=cos-setup-network.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
# Note: This cloud-init doesn't use the standard cloud-init config probably due to: https://github.com/rancher/os2/issues/7 | ||
# As a workaround, use the internal extended syntax | ||
stages: | ||
network: | ||
- name: "Setup users" | ||
ensure_entities: | ||
- path: /etc/passwd | ||
entity: | | ||
kind: "user" | ||
username: "vagrant" | ||
password: "x" | ||
homedir: "/run/tmp/vagrant" | ||
shell: "/bin/bash" | ||
- path: /etc/shadow | ||
entity: | | ||
kind: "shadow" | ||
username: "vagrant" | ||
password: "" | ||
- path: /etc/shadow | ||
entity: | | ||
kind: "shadow" | ||
username: "root" | ||
password: "ros" | ||
commands: | ||
- mkdir -p /run/tmp/vagrant | ||
- name: "Setup pubkey" | ||
authorized_keys: | ||
vagrant: | ||
- https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub | ||
name: "Setup for the vagrant user" | ||
#cloud-config | ||
|
||
# Add additional users or set the password/ssh keys for root | ||
users: | ||
- name: "root" | ||
passwd: "ros" | ||
ssh_authorized_keys: | ||
- https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub | ||
# - name: "vagrant" | ||
# passwd: "vagrant" | ||
# shell: "/bin/bash" | ||
# homedir: "/run/vagrant" | ||
# ssh_authorized_keys: | ||
# - https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub | ||
|
||
# Temp workaround for https://github.com/rancher-sandbox/os2/issues/15. | ||
# Uncomment the lines commented before and drop runcmd when it is closed. | ||
runcmd: | ||
- systemctl start wicked | ||
#- useradd -d /run/vagrant -U -s /bin/bash -m vagrant | ||
- mkdir /root/.ssh | ||
- curl -L https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub -o /root/.ssh/authorized_keys | ||
- chmod 700 /root/.ssh | ||
- chmod 600 /root/.ssh/authorized_keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters