-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
azure: Add packer template for azure
Signed-off-by: Itxaka <[email protected]>
- Loading branch information
Itxaka
committed
Jul 15, 2021
1 parent
b799ee3
commit e154a36
Showing
6 changed files
with
135 additions
and
16 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
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ stages: | |
filesystem: ext4 | ||
- fsLabel: COS_PERSISTENT | ||
pLabel: persistent | ||
filesystem: ext4 | ||
filesystem: ext4 |
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,27 @@ | ||
name: "Default deployment" | ||
stages: | ||
rootfs.after: | ||
- if: '[ -f "/run/cos/recovery_mode" ]' | ||
name: "Repart image" | ||
layout: | ||
device: | ||
label: COS_RECOVERY | ||
add_partitions: | ||
- fsLabel: COS_STATE | ||
size: 9192 | ||
pLabel: state | ||
filesystem: ext4 | ||
- fsLabel: COS_PERSISTENT | ||
pLabel: persistent | ||
filesystem: ext4 | ||
# Azure does not allow to ssh with root user so we need to create an user to provision the image correctly | ||
network: | ||
- if: '[ -f "/run/cos/recovery_mode" ]' | ||
commands: | ||
- useradd "packer" -m -u 1500 # Add packer user | ||
- echo "packer:cos" | chpasswd # change packer pass | ||
- usermod -a -G root packer # add packer to root group | ||
- if: '[ -f "/run/cos/recovery_mode" ]' | ||
files: | ||
- path: /etc/sudoers.d/wheel # set passwordless sudo | ||
content: "packer ALL = (ALL) NOPASSWD: ALL" |
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