cdk-valheim
A high level CDK construct of Valheim dedicated server.
Features
- Fargate cluster to run a Valheim server, with EFS for persistence (schedulable)
- Hourly AWS Backup with 3 days retention (customizable)
- lloesche/valheim-server as the default container image (replaceable)
See integration test for an example.
API Doc
See API.md
References
- On-demand, serverless Valheim server setup with AWS CDK, Discord Interactions and GitLab CI
- Grantapher/discord-cdk-valheim
Examples
The construct is published to both npm and PyPI.
TypeScript
new ValheimWorld(stack, 'ValheimWorld', {
cpu: 2048,
memoryLimitMiB: 4096,
schedules: [{
start: { hour: '12', weekDay: '1-5' },
stop: { hour: '1', weekDay: '1-5' },
}],
environment: {
SERVER_NAME: 'CDK Valheim',
WORLD_NAME: 'Amazon',
SERVER_PASS: 'fargate',
BACKUPS: 'false',
},
});
Python
ValheimWorld(
self,
'ValheimWorld',
cpu=2048,
memory_limit_mib=4096,
schedules=[ValheimWorldScalingSchedule(
start=CronOptions(hour='12', week_day='1-5'),
stop=CronOptions(hour='1', week_day='1-5'),
)],
environment={
'SERVER_NAME': 'CDK Valheim',
'WORLD_NAME': 'Amazon',
'SERVER_PASS': 'fargate',
'BACKUPS': 'false',
})
Testing
- Unit test and snapshot test
npx projen test
- Integration test
npx cdk -a "npx ts-node src/integ.valheim.ts" diff
npx cdk -a "npx ts-node src/integ.valheim.ts" deploy
Metadata
Release files for cdk-valheim 0.0.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cdk-valheim-0.0.26.tar.gz | 388.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cdk_valheim-0.0.26-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 775.9 kB
Release files / cdk-valheim-0.0.26.tar.gz
| Download URL | cdk-valheim-0.0.26.tar.gz |
|---|---|
| Size | 388.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98955d54456fa3c691713c707c7ee6127c3a9503bd70fa8a26286c8e078b7dc8
|
|
BLAKE2b-256 checksum How to use checksums |
0a49313b4b51aac1fda459a16ebef2566c5e92f3c495b76e9eb8d9993cca7468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / cdk_valheim-0.0.26-py3-none-any.whl
| Download URL | cdk_valheim-0.0.26-py3-none-any.whl |
|---|---|
| Size | 387.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d016e1252565ca37b9cafa0fca0a4897a2636199fca8cc7bb126e13bc346c15
|
|
BLAKE2b-256 checksum How to use checksums |
4fcec6e754e4f70b7833d0461d6268d52f7255e30b4dcc86f60adc6ff4f5ce26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|