Add Linux development station role with systemd services for code-server and OpenCode
- Implemented handlers for restarting code-server and OpenCode services. - Created main tasks for setting up a Linux development station, including user management, package installation, and configuration. - Added validation for OpenCode server credentials and code-server password. - Introduced tool package management for npm, uv, and go installers. - Developed templates for systemd service units for code-server and OpenCode. - Included scripts for starting code-server and OpenCode with SSH agent support. - Updated inventory and Terraform configuration to include new development host.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=OpenCode - AI-powered terminal IDE
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ linux_dev_station_service_user }}
|
||||
Group={{ linux_dev_station_service_user }}
|
||||
WorkingDirectory={{ linux_dev_station_workspace_dir }}
|
||||
ExecStart=/bin/bash {{ linux_dev_station_scripts_dir }}/start-opencode.sh
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=append:{{ linux_dev_station_logs_dir }}/opencode.log
|
||||
StandardError=append:{{ linux_dev_station_logs_dir }}/opencode.err.log
|
||||
|
||||
Environment="HOME={{ linux_dev_station_service_home }}"
|
||||
Environment="PATH={{ linux_dev_station_path }}"
|
||||
Environment="OPENCODE_SERVER_USERNAME={{ linux_dev_station_opencode_server_username }}"
|
||||
Environment="OPENCODE_SERVER_PASSWORD={{ linux_dev_station_opencode_server_password }}"
|
||||
{% for env_key, env_value in linux_dev_station_opencode_extra_environment.items() %}
|
||||
Environment="{{ env_key }}={{ env_value }}"
|
||||
{% endfor %}
|
||||
{% if linux_dev_station_ssh_agent_enabled | bool %}
|
||||
Environment="SSH_AUTH_SOCK={{ linux_dev_station_ssh_agent_socket }}"
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user