Comments (3)
How i've been personally tackling deploying to t4g.micro
is by doing the evaluation and building outside of the instance. And have the instance pull the build on startup.
Instead of setting the user data to a nix configuration: that is built locally on the instance; I set the user data to a shell script that downloads the already built nixos configuration:
e.g. set the user data of the instance to:
user_data = base64encode(<<-EOF
#!/usr/bin/env bash
set -e
nix build '${var.nix_store_path}' \
--profile /nix/var/nix/profiles/system \
--experimental-features 'nix-command' \
--extra-substituters '${local.nix_substituter}' \
--extra-trusted-public-keys '${local.nix_trusted_public_key}'
/nix/var/nix/profiles/system/bin/switch-to-configuration switch
EOF
)
And in CI:
nix copy --to my-cache .#nixosConfigurations.myserver.config.system.build.toplevel
Or if you're doing push based deploys:
nixos-rebuild switch --target-host <the-ip-of-the-instance>
from amis.
For the /boot
problem I think we can try to make the /boot
partition a bit larger. I'll look into it.
from amis.
I was completely oblivious to the fact that you can remotely build configurations, I'll definitely look into this!
from amis.
Related Issues (20)
- Skip download if AMI already uploaded
- Allow cross-account ec2:CopyImage
- Fix plan output in job summary.
- You have reached your quota of 5 for the number of public images allowed in this Region. Deregister unused public images or make them private, or request an increase in your public AMIs quota.
- Publish AMIs through AWS MarketPlace!
- Make curl from hydra robust against transient errors
- IMDS v2 minimum breaks existing expressions HOT 6
- Display correct Account ID on github page
- Switch to NixOS foundation account and go live HOT 10
- Add Terraform and awscli example to github page
- Smoketest something fails in waiter due to terminated instance HOT 1
- Also upload for 23.11 and backport to the old website HOT 1
- include ssm-agent by default in the image HOT 3
- Add toggle to only show latest AMI by default
- We're running into public image quota again HOT 2
- IPv6 support HOT 1
- Stop using CopyImage, upload to all regions in Parallel HOT 1
- Switch to us-east-1 as base-region so we can run smoketests on non-intro instances
- [BUG] EC2 AMIs do not start user-data provisioning or amazon-init.service HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amis.