aboutsummaryrefslogtreecommitdiff
path: root/nixos/maintainers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #102174 from grahamc/ami-root-use-gptGraham Christensen2020-10-301-1/+1
|\ | | | | AMI root partition table: use GPT to support >2T partitions
| * nixos.amazonAmi: use legacy+gpt disk images to support partitions >2TGraham Christensen2020-10-301-1/+1
| |
* | create-amis: improve wording around the service name's IAM roleGraham Christensen2020-10-301-2/+2
| | | | | | Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
* | create-amis: allow customizing the service role nameGraham Christensen2020-10-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The complete setup on the AWS end can be configured with the following Terraform configuration. It generates a ./credentials.sh which I just copy/pasted in to the create-amis.sh script near the top. Note: the entire stack of users and bucket can be destroyed at the end of the import. variable "region" { type = string } variable "availability_zone" { type = string } provider "aws" { region = var.region } resource "aws_s3_bucket" "nixos-amis" { bucket_prefix = "nixos-amis-" lifecycle_rule { enabled = true abort_incomplete_multipart_upload_days = 1 expiration { days = 7 } } } resource "local_file" "credential-file" { file_permission = "0700" filename = "${path.module}/credentials.sh" sensitive_content = <<SCRIPT export service_role_name="${aws_iam_role.vmimport.name}" export bucket="${aws_s3_bucket.nixos-amis.bucket}" export AWS_ACCESS_KEY_ID="${aws_iam_access_key.uploader.id}" export AWS_SECRET_ACCESS_KEY="${aws_iam_access_key.uploader.secret}" SCRIPT } # The following resources are for the *uploader* resource "aws_iam_user" "uploader" { name = "nixos-amis-uploader" } resource "aws_iam_access_key" "uploader" { user = aws_iam_user.uploader.name } resource "aws_iam_user_policy" "upload-to-nixos-amis" { user = aws_iam_user.uploader.name policy = data.aws_iam_policy_document.upload-policy-document.json } data "aws_iam_policy_document" "upload-policy-document" { statement { effect = "Allow" actions = [ "s3:ListBucket", "s3:GetBucketLocation", ] resources = [ aws_s3_bucket.nixos-amis.arn ] } statement { effect = "Allow" actions = [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject", ] resources = [ "${aws_s3_bucket.nixos-amis.arn}/*" ] } statement { effect = "Allow" actions = [ "ec2:ImportSnapshot", "ec2:DescribeImportSnapshotTasks", "ec2:DescribeImportSnapshotTasks", "ec2:RegisterImage", "ec2:DescribeImages" ] resources = [ "*" ] } } # The following resources are for the *vmimport service user* # See: https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role resource "aws_iam_role" "vmimport" { assume_role_policy = data.aws_iam_policy_document.vmimport-trust.json } resource "aws_iam_role_policy" "vmimport-access" { role = aws_iam_role.vmimport.id policy = data.aws_iam_policy_document.vmimport-access.json } data "aws_iam_policy_document" "vmimport-access" { statement { effect = "Allow" actions = [ "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", ] resources = [ aws_s3_bucket.nixos-amis.arn, "${aws_s3_bucket.nixos-amis.arn}/*" ] } statement { effect = "Allow" actions = [ "ec2:ModifySnapshotAttribute", "ec2:CopySnapshot", "ec2:RegisterImage", "ec2:Describe*" ] resources = [ "*" ] } } data "aws_iam_policy_document" "vmimport-trust" { statement { effect = "Allow" principals { type = "Service" identifiers = [ "vmie.amazonaws.com" ] } actions = [ "sts:AssumeRole" ] condition { test = "StringEquals" variable = "sts:ExternalId" values = [ "vmimport" ] } } }
* | create-amis.sh: log the full response if describing the import snapshot ↵Graham Christensen2020-10-301-0/+2
| | | | | | | | tasks fails
* | nixos ec2/create-amis.sh: shellcheck: $ is not needed in arithmeticGraham Christensen2020-10-301-1/+1
| |
* | nixos ec2/create-amis.sh: shellcheck: explicitly make the additions to ↵Graham Christensen2020-10-301-4/+4
| | | | | | | | block_device_mappings single strings
* | nixos ec2/create-amis.sh: shellcheck: read without -r mangles backslashesGraham Christensen2020-10-301-2/+2
| |
* | nixos ec2/create-amis.sh: shellcheck: SC2155: Declare and assign separately ↵Graham Christensen2020-10-301-3/+6
| | | | | | | | to avoid masking return values.
* | nixos ec2/create-amis.sh: shellcheck: quote state_dir referenceGraham Christensen2020-10-301-1/+1
| |
* | nixos ec2/create-amis.sh: shellcheck: quote region referencesGraham Christensen2020-10-301-8/+9
|/
* Merge pull request #89116 from wagdav/fix-args-create-amisLassulus2020-08-221-1/+1
|\ | | | | nixos/maintainers/scripts/ec2/create-amis.sh: fix argument check
| * create-amis: fix argument checkDavid Wagner2020-05-281-1/+1
| | | | | | | | | | | | | | | | | | Because this script enables `set -u` when no arguments are provided bash exits with the error: $1: unbound variable instead of the helpful usage message.
* | nixos/ec2: remove dependency on NIX_PATHJörg Thalheim2020-08-161-2/+2
| | | | | | | | This is required when migrating to flakes
* | nixos/maintainers/*: editorconfig fixeszowoq2020-08-043-4/+4
| |
* | nixos/azure-new: use local nixpkgsCole Mickens2020-04-271-1/+1
|/
* nixos/azure: clarify how users work in basic exampleCole Mickens2020-03-292-0/+10
|
* nixos/azure: upload-image.sh cleanup $1 handlingCole Mickens2020-03-291-2/+2
|
* nixos/azure: upload-image names the image betterCole Mickens2020-03-291-2/+5
|
* nixos/azure: simplify example imageCole Mickens2020-03-292-23/+17
|
* azure: init nixos/maintainers/scripts/azure-newCole Mickens2020-03-298-0/+194
|
* nixos-ami: update nvme_core.io_timeout for linux kernel >= 4.15Benjamin Hipple2020-03-221-3/+8
| | | | | | NixOS 20.03 is built on kernel 5.4 and 19.09 is on 4.19, so we should update this option to the highest value possible, per linked upstream instructions from Amazon.
* create-amis: Add eu-north-1adisbladis2020-03-051-1/+1
|
* maintainers/create-azure.sh: run from anywhereAlyssa Ross2020-01-091-2/+2
| | | | | I'm not really sure how the line directly after ended up with this, but this line didn't...
* ec2/create-amis.sh: register root device as /dev/xvdaAndrew Childs2019-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the case of blkfront drives, there appears to be no difference between /dev/sda1 and /dev/xvda: the drive always appears as the kernel device /dev/xvda. For the case of nvme drives, the root device typically appears as /dev/nvme0n1. Amazon provides the 'ec2-utils' package for their first party linux ("Amazon Linux"), which configures udev to create symlinks from the provided name to the nvme device name. This name is communicated through nvme "Identify Controller" response, which can be inspected with: nvme id-ctrl --raw-binary /dev/nvme0n1 | cut -c3073-3104 | hexdump -C On Amazon Linux, where the device is attached as "/dev/xvda", this creates: - /dev/xvda -> nvme0n1 - /dev/xvda1 -> nvme0n1p1 On NixOS where the device is attach as "/dev/sda1", this creates: - /dev/sda1 -> nvme0n1 - /dev/sda11 -> nvme0n1p1 This is odd, but not inherently a problem. NixOS unconditionally configures grub to install to `/dev/xvda`, which fails on an instance using nvme storage. With the root device name set to xvda, both blkfront and nvme drives are accessible as /dev/xvda, either directly or by symlink.
* ec2-amis.nix: add 19.09 amisAmineChikhaoui2019-10-281-1/+1
| | | | | replace /home/deploy -> $HOME to allow running the script from outside the bastion.
* scripts/gce: make image name configurableJohan Thomsen2019-10-251-1/+1
|
* amazon-image.nix: upload prebuilt imagesAndrew Childs2019-09-052-254/+279
|
* amazon-image.nix: add hydra-build-products and improve metadataAndrew Childs2019-09-051-1/+10
|
* amazon-image.nix: default to vpc formatted imagesAndrew Childs2019-09-051-1/+1
| | | | These can be imported without converison.
* amazon-image.nix: add EFI support, enable by default for aarch64Andrew Childs2019-09-051-1/+6
|
* mass replace "flip map -> forEach"danbst2019-08-051-1/+1
| | | | | | | See `forEach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g' ```
* Revert "mass replace "flip map -> foreach""danbst2019-08-051-1/+1
| | | | This reverts commit 3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.
* mass replace "flip map -> foreach"danbst2019-07-141-1/+1
| | | | | | | See `foreach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /foreach /g' ```
* treewide: Remove usage of isNullDaniel Schaefer2019-04-291-1/+1
| | | | isNull "is deprecated; just write e == null instead" says the Nix manual
* amazon-image.nix: Resolve failure to include resize2fstalyz2019-03-151-0/+1
| | | | | | Since 34234dcb511, for resize2fs to be automatically included in initrd, a filesystem needed for boot must be explicitly defined as an ext* type filesystem.
* Merge pull request #44573 from vincentbernat/feature/cloudstackRyan Mulligan2019-02-241-0/+23
|\ | | | | nixos/cloudstack-image: initial import
| * nixos/cloudstack-image: initial importVincent Bernat2018-11-171-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cloudstack images are simply using cloud-init. They are not headless as a user usually have access to a console. Otherwise, the difference with Openstack are mostly handled by cloud-init. This is still some minor issues. Notably, there is no non-root user. Other cloud images usually come with a user named after the distribution and with sudo. Would it make sense for NixOS? Cloudstack gives the user the ability to change the password. Cloud-init support for this is imperfect and the set-passwords module should be declared as `- [set-passwords, always]` for this to work. I don't know if there is an easy way to "patch" default cloud-init configuration. However, without a non-root user, this is of no use. Similarly, hostname is usually set through cloud-init using `set_hostname` and `update_hostname` modules. While the patch to declare nixos to cloud-init contains some code to set hostname, the previously mentioned modules are not enabled.
* | Rename `novaImage` to `openstackImage`Antoine Eiche2019-02-112-26/+26
| | | | | | | | | | | | People don't necessary know `nova` is related to Openstack (it is a component of Openstack). So, it is more explicit to call it `openstackImage`.
* | google-compute-image: make it a module and the size tuneable (#49854)Ding Xiang Fei2018-11-261-2/+2
|/ | | | | * move GCE system configuration to `google-compute-config.nix` * remove `fetch-ssh-keys` service (disabled in comment)
* create-amis.sh: Change directory for AMIsEelco Dolstra2018-07-241-1/+2
|
* [bot] nixos/*: remove unused arguments in lambdasvolth2018-07-201-2/+2
|
* maintainers/create-azure.sh: remove hydra.nixos.org as binary cache (#41883)Jörg Thalheim2018-06-121-1/+1
|
* Fix kernel crash caused by absent root deviceIhor Antonov2018-05-121-1/+1
|
* Fix kernel panic on ec2 kvm instances caused by io timeout on nvme root volumeIhor Antonov2018-05-121-0/+5
|
* treewide: rename version attributesMaximilian Bosch2018-04-281-1/+1
| | | | | | | | | | | | | | | As suggested in https://github.com/NixOS/nixpkgs/pull/39416#discussion_r183845745 the versioning attributes in `lib` should be consistent to `nixos/version` which implicates the following changes: * `lib.trivial.version` -> `lib.trivial.release` * `lib.trivial.suffix` -> `lib.trivial.versionSuffix` * `lib.nixpkgsVersion` -> `lib.version` As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`, `NixOS/nix` and probably several user's setups. As the rename will cause a notable impact it's better to keep `lib.nixpkgsVersion` as alias with a warning yielded by `builtins.trace`.
* Update create-gce.sh script. Set default option for GCE images to disable ↵Rob Vermaas2018-04-061-2/+2
| | | | | | host key replacement by service. (cherry picked from commit 748d96ffa3c51c3127bcdf23a88d54afad6406e9)
* nixos/maintainers/option-usages.nix: Improve spelling and grammarAndré-Patrick Bubel2018-04-021-3/+3
|
* nixos/make-disk-image.nix: Support EFI imagesTuomas Tynkkynen2018-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | - Add a new parameter `imageType` that can specify either "efi" or "legacy" (the default which should see no change in behaviour by this patch). - EFI images get a GPT partition table (instead of msdos) with a mandatory ESP partition (so we add an assert that `partitioned` is true). - Use the partx tool from util-linux to determine exact start + size of the root partition. This is required because GPT stores a secondary partition table at the end of the disk, so we can't just have mkfs.ext4 create the filesystem until the end of the disk. - (Unrelated to any EFI changes) Since we're depending on the `-E offset=X` option to mkfs which is only supported by e2fsprogs, disallow any attempts of creating partitioned disk images where the root filesystem is not ext4.
* create-amis.sh: Ass eu-west-3Eelco Dolstra2017-12-201-1/+1
|