기사에서 How to install Canvas LMS on Ubuntu 22.04 Github 저장소의 오픈 소스 Canvas 학습 관리 시스템을 자체 서버에 설치하는 단계를 제공했습니다. 하지만 누가 그 모든 명령을 터미널에 수동으로 입력하고 싶겠습니까? 결국 우리가 원숭이와 다른 점은 무엇입니까? 자동화 도구를 사용하면 됩니다!
Script below automates Canvas LMS deployment on Ubuntu 22.04 using Ansible configuration management tool.
Before you begin installation check out our Canvas LMS hosting service. You can start using the LMS right away without need to manage own servers.
How to use Ansible to Automate Canvas LMS installation
서버 준비
서버에 Ansible과 Git을 설치하여 시작해 보세요.
$ sudo apt install ansible git
Clone the repository with Canvas LMS installation script
클론 canvaslms 앤서블 설치 Github의 저장소.
$ git clone https://github.com/EugeneWHZ/canvaslms-ansible-installation.git $ cd canvaslms-ansible-installation
Ansible용 인벤토리 생성
"production.example" 파일에서 Ansible 인벤토리 파일을 생성하고 교체합니다. web_server_ip, db_server_ip, redis_server_ip 서버의 IP 주소 또는 호스트 이름으로.
$ cp production.example production $ vim production
에 설치하는 경우 로컬호스트 인벤토리 파일에 다음과 같은 내용을 넣을 수 있습니다.
[webservers] localhost:22 ansible_connection=local ansible_python_interpreter="/usr/bin/env python3" [dbservers] localhost:22 ansible_connection=local ansible_python_interpreter="/usr/bin/env python3" [redisservers] localhost:22 ansible_connection=local ansible_python_interpreter="/usr/bin/env python3"
변수 수정
다음으로 변수 파일을 복사하고 편집합니다.
$ cp roles/common/vars/main.yml.example roles/common/vars/main.yml $ vim roles/common/vars/main.yml
변수 파일은 설명이 필요 없지만 여전히 의심스러운 경우를 대비하여 다음 예가 있습니다.

Run Ansible playbook to install the open source Canvas LMS system
When you are done with inventory and variables you can finally run the playbook which does all the job installing Canvas LMS on your server. Some of the tasks in the playbook, such as 원사 설치 그리고 캔버스 컴파일 자산 작업을 완료하는 데 상당한 시간이 걸리므로 컴퓨터에서 10~15분 정도 휴식을 취하고 Ansible이 작업을 수행하도록 하십시오.
$ ansible-playbook -i production master.yml
Ansible 플레이북이 일부 단계에서 실패하면 문제를 해결하고 '–start-at-task=”task name”' 런타임 변수를 사용하여 실패한 작업에서 플레이북을 다시 시작해야 합니다. 예를 들어:
$ ansible-playbook -i production --start-at-task="install yarn" master.yml
전체 설치를 실행하는 대신 webservers.yml, dbservers.yml 또는 redis.yml 플레이북을 실행하여 웹 서버, 데이터베이스 서버 또는 Redis 서버 구성 요소만 개별적으로 설치할 수 있습니다.
$ ansible-playbook -i production webservers.yml $ ansible-playbook -i production dbservers.yml $ ansible-playbook -i production redis.yml
요약: 자동화는 삶을 더 쉽게 만듭니다!
Manual installation of the open source Canvas LMS system is time consuming and prone to errors. Utilize automation tools like bash scripts, Python and Ansible to free yourself from typing commands into terminal over and over!





