专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

presslabs/zinc Docker 镜像 - 轩辕镜像

zinc
presslabs/zinc
自动构建
presslabs
zinc dns
0 次下载
🙃 代码没问题,结果发布失败在拉镜像
镜像简介版本下载
🙃 代码没问题,结果发布失败在拉镜像

zinc

![Build Status]([***]

Route 53 zone manager.

Policy Records on the Cheap

Q: Why would one use Zinc over AWS's Policy Records?

A: Price. 50$ per Record adds up quickly.

Overview

IPs, Policies and Policy Records

At the end of the day your domain name example.com needs to resolve to one or more ip addresses. Here's how we go about it.

IPs

Should be self explanatory. An IP can be enabled or disabled.

There is no explicit handling in zinc of multiple IPs belonging to one server.

Enabling or disabling can be done from the admin or by implementing a django app (see lattice_sync for an example).

N.B. If implementing your own app it's your responsibility to call ip.mark_policy_records_dirty if the IP changes, so that zinc's reconcile loop will actually pick up the changes.

HealthChecks

Zinc will create a Route53 Health Check for each IP. If Route53 deems the IP unavailable, it will stop routing traffic to it.

Currently the Health Checks are hardcoded to expect all servers to accept requests with the same FQDN (defaults to node.presslabs.net, set ZINC_HEALTH_CHECK_FQDN to change).

Policies

A policy groups several IPs together. There are 2 types of policies:

  • Weighted
  • Latency

Note that an IP can be a member of multiple Policies at the same time. A PolicyMember can has it's own enabled flag, so you can disable an IP for one Policy only, or you can disable the it for all Policies by setting the enabled flag on the IP model.

Weighted

Trafic will be routed to all IP's based on their weights. Bigger weight means more trafic.

Latency

Each IP you add to a Policy will have a region specified as well. The region must be an AWS region. IPs will still have weights, which will be used to balance the trafic within a region. When a cliend does a DNS lookup, they'll get directed to the region with the lowest latency, and then an IP will be picked based on weight.

The resulting setup will be similar to the example described here: [***]

Policy Records

Your desired DNS record. In Route53 it will be an alias to the Latency or Weighted records that make up a Policy.

Reconcile Loops and the Single Source of Truth

For simple records in a zone (anything except a PolicyRecord) AWS is the Sigle Source of Truth. Zinc never stores those locally.

For Zones, HealthChecks and PolicyRecords Zinc's database is the single source of truth. Zinc runs reconcile loops and attempts to update your AWS data to match the expected state in the DB. To minimize throttling by AWS, in most cases, Zinc only attempts to reconcile objects marked deemed dirty. This means it is possible to have a missmatch between what you have in AWS and Zinc's expected state if you make changes bypassing Zinc (using the AWS console, or the api).

API

You are encouraged to install django-rest-swagger, run zinc locally and explore the API at http://localhost:8000/swagger

Policies

Policies are read only trough the API. You can define them in the admin.

Policy listing.

GET /policies

Policy detail. Example:

GET /policies/{id}

GET /policies/344b7bee-da33-4234-b645-805cc26adab0
{
  "id": "344b7bee-da33-4234-b645-805cc26adab0",
  "name": "policy-one",
  "members": [
    {
      "id": "6bcb4e77-04dc-45f7-bebb-a2fcfadd7669",
      "region": "us-east-1",
      "ip": "192.0.2.11",
      "weight": 10,
      "enabled": true
    },
    {
      "id": "4f83d47f-af0c-4fa7-80c8-710cb32e4928",
      "region": "us-west-1",
      "ip": "192.0.2.11",
      "weight": 10,
      "enabled": true
    }
  ],
  "url": "[***]"
}
Zones
Zone listing.

GET /zones/

Zone creation.

POST /zones/

Args:

argumentrequireddefaultdescription
rootrequired-The domain name of this zone. Trailing dot is optional.

Returns the newly created zone object.

Delete a zone.

DELETE /zones/{zone_id}/

Zone detail.

GET /zones/{zone_id}

Example:

GET /zones/102
{
  "root": "zinc.example.presslabs.net.",
  "url": "[***]",
  "records_url": "[***]",
  "records": [
    {
      "name": "@",
      "fqdn": "zinc.example.presslabs.net.",
      "type": "NS",
      "values": [
        "ns-389.awsdns-48.com.",
        "ns-1596.awsdns-07.co.uk.",
        "ns-1008.awsdns-62.net.",
        "ns-1294.awsdns-33.org."
      ],
      "ttl": ***,
      "dirty": false,
      "id": "Z6k504rwKzbamNZ9ZmY5lvkoOJGDW0",
      "url": "[***]",
      "managed": true
    },
    {
      "name": "@",
      "fqdn": "zinc.example.presslabs.net.",
      "type": "SOA",
      "values": [
        "ns-389.awsdns-48.com. awsdns-hostmaster.amazon.com. 1 7200 900 *** 86400"
      ],
      "ttl": 900,
      "dirty": false,
      "id": "Z6k504rwKzbamNZ6Z7doJ0yg98j9zA",
      "url": "[***]",
      "managed": true
    }
  ],
  "route53_id": "Z8QRF09VVGAC6",
  "dirty": false,
  "ns_propagated": false
}
Records
List records in a zone.

GET /zones/{zone_id}/records

Example:

GET /zones/102/records
[
  {
    "name": "@",
    "fqdn": "zinc.example.presslabs.net.",
    "type": "NS",
    "values": [
      "ns-389.awsdns-48.com.",
      "ns-1596.awsdns-07.co.uk.",
      "ns-1008.awsdns-62.net.",
      "ns-1294.awsdns-33.org."
    ],
    "ttl": ***,
    "dirty": false,
    "id": "Z6k504rwKzbamNZ9ZmY5lvkoOJGDW0",
    "url": "[***]",
    "managed": true
  },
  {
    "name": "@",
    "fqdn": "zinc.example.presslabs.net.",
    "type": "SOA",
    "values": [
      "ns-389.awsdns-48.com. awsdns-hostmaster.amazon.com. 1 7200 900 *** 86400"
    ],
    "ttl": 900,
    "dirty": false,
    "id": "Z6k504rwKzbamNZ6Z7doJ0yg98j9zA",
    "url": "[***]",
    "managed": true
  }
]
Create a record.

POST /zones/{zone_id}/records

Args:

argumentrequireddefaultdescription
namerequired-The domain name (without the zone root).
typerequired-The record type. Must be either POLICY_ROUTED or a valid record type.
valuesrequired-List of values. Should be one IP for A, MX records, a policy id for POLICY_ROUTED, one or more domain names for NS records.
ttloptional300The TTL for DNS.
Delete a record.

DELETE /zones/{zone_id}/records/{record_id}

Record detail.

GET /zones/{zone_id}/records/{record_id}

Example:

GET /zones/102/records/Z6k504rwKzbamNZ1ZxLxRR4BKly04J
{
  "name": "www",
  "fqdn": "[***]",
  "type": "POLICY_ROUTED",
  "values": [
    "344b7bee-da33-4234-b645-805cc26adab0"
  ],
  "ttl": null,
  "dirty": false,
  "id": "Z6k504rwKzbamNZ1ZxLxRR4BKly04J",
  "url": "[***]",
  "managed": false
}
Update an existing record.

PATCH /zones/{zone_id}/records/{record_id}

The type and name can't be changed. Missing attributes don't change.

argumentrequireddefaultdescription
valuesoptional-List of values. Should be one IP for A, MX records, a policy id for POLICY_ROUTED, one or more domain names for NS records.
ttloptional-The TTL for DNS.

Installing and Running

The recomended way to get up and running is using our Docker container.

cd contrib/
docker-compose up

Config

If you run the django project with default settings, you can configure zinc by setting environment variables. If you're using the provided docker-compose.yml you can set the environment in ./zinc.env

The following are essential and required:

ZINC_AWS_KEY - AWS Key
ZINC_AWS_SECRET - AWS Secret
ZINC_SECRET_KEY - Django secret

You can also set the following:

ZINC_ALLOWED_HOSTS - Django Allowed Hosts
ZINC_BROKER_URL - Celery Broker URL, defaults to ${REDIS_URL}/0
ZINC_CELERY_RESULT_BACKEND - Celery Result Backend, defaults to ${REDIS_URL}/1
ZINC_DATA_DIR - PROJECT_ROOT
ZINC_DB_ENGINE - The django db engine to use. Defaults to 'django.db.backends.sqlite3'
ZINC_DB_HOST -
ZINC_DB_NAME - zinc
ZINC_DB_PASSWORD - password
ZINC_DB_PORT -
ZINC_DB_USER - zinc
ZINC_DEBUG - Django debug. Defaults to False. Set to the string "True" to turn on debugging.
ZINC_DEFAULT_TTL - 300
ZINC_ENV_NAME - The environment for sentry reporting.
ZINC_GOOGLE_OAUTH2_KEY - For use with social-django. If you don't set this, social-django will be disabled.
ZINC_GOOGLE_OAUTH2_SECRET - For use with social-django.
ZINC_SOCIAL_AUTH_ADMIN_EMAILS - List of email addresses that will be automatically granted admin access.
ZINC_SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS - see [***]
ZINC_HEALTH_CHECK_FQDN - Hostname to use in Health Checks. Defaults to 'node.presslabs.net.'
ZINC_LOCK_SERVER_URL - Used with redis-lock. Defaults to ${REDIS_URL}/2.
ZINC_LOG_LEVEL - Defaults to INFO
ZINC_NS_CHECK_RESOLVERS - NameServers to use when checking zone propagation. Default: ['8.8.8.8']
ZINC_REDIS_URL - Defaults to 'redis://localhost:6379'
ZINC_SECRET_KEY - The secret key used by the django app.
ZINC_SENTRY_DSN - Set this to enable sentry error reporting.
ZINC_STATIC_URL - Defaults to '/static/'
ZINC_ZONE_OWNERSHIP_COMMENT - Set this comment on records, to Defaults to 'zinc'

Development

Warning! Don't use production AWS credentials when developing or testing Zinc!

After you've cloned the code:

pip install -r requirements.dev.txt
python setup.py develop
cp local_settings.py.example local_settings.py
# open local_settings.py in your favorite editor, and set AWS credentials

To run the tests:

# all tests
py.test .

# to skip tests that need AWS
py.test -k 'not with_aws' .
查看更多 zinc 相关镜像 →
presslabs/php-runtime logo
presslabs/php-runtime
presslabs
暂无描述
10K+ pulls
上次更新:1 天前
presslabs/wordpress-runtime logo
presslabs/wordpress-runtime
presslabs
暂无描述
10K+ pulls
上次更新:1 天前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
presslabs/zinc
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.