Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
wikibase
Search
Search
English
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Synapolis/VPS Agent Deployment Guide
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Вариант B: cloud-init / user-data block === Если провайдер поддерживает cloud-init, лучше сразу создать отдельного пользователя агента и не заставлять человека выполнять команды вручную. Шаблон нужно адаптировать: заменить `agent_name` и `ssh-ed25519 AAAA...` на реальные значения. <syntaxhighlight lang="yaml"> #cloud-config users: - name: agent_name groups: sudo shell: /bin/bash sudo: ['ALL=(ALL) NOPASSWD:ALL'] ssh_authorized_keys: - ssh-ed25519 AAAA_REPLACE_WITH_AGENT_PUBLIC_KEY agent-name@context package_update: true packages: - git - curl - ca-certificates - jq runcmd: - mkdir -p /opt/agent-workspace - chown agent_name:agent_name /opt/agent-workspace - echo "agent bootstrap started" > /opt/agent-workspace/bootstrap-status.txt </syntaxhighlight> После создания VPS агент входит: <syntaxhighlight lang="bash"> ssh agent_name@VPS_IP sudo -n true cat /opt/agent-workspace/bootstrap-status.txt </syntaxhighlight> Для постоянного сервера лучше заменить `NOPASSWD:ALL` на более узкие sudo rules после первичного bootstrap, если агенту не нужен полный админ-доступ.
Summary:
Please note that all contributions to wikibase may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wikibase:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width