Here we document how to reuse existing containers within the Instruqt environment.
Refer to the Gitea Configuration Cheat Sheet for full environment variable options.
- name: gitea
image: gitea/gitea:1.16.8
ports:
- 3000
environment:
GITEA__DEFAULT__RUN_MODE: dev
GITEA__database__DB_TYPE: sqlite3
GITEA__database__PATH: /data/gitea/gitea.db
GITEA__picture__DISABLE_GRAVATAR: "true"
GITEA__repository__DEFAULT_PRIVATE: "false"
GITEA__repository__DEFAULT_PUSH_CREATE_PRIVATE: "false"
GITEA__repository__ENABLE_PUSH_CREATE_ORG: "true"
GITEA__repository__ENABLE_PUSH_CREATE_USER: "true"
GITEA__repository__ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET: "false"
GITEA__security__INSTALL_LOCK: "true"
GITEA__server__DOMAIN: http://gitea
GITEA__server__OFFLINE_MODE: "true"
GITEA__server__ROOT_URL: http://gitea:3000
GITEA__server__SSH_DOMAIN: http://gitea
GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__REQUIRE_SIGNIN_VIEW: "false"
GITEA__webhook__ALLOWED_HOST_LIST: '*'
USER_GID: "1000"
USER_UID: "1000"
memory: 1024
- Title:
gitea
or custom choice - Type:
Service
- Host:
gitea
or other name from the environment configuration - Path:
/
- Port:
3000
The container is deployed without a default configuration. So during first access the following three steps need to be done:
- register a user
- configure the SSH key for the user
- create a first repository
Note
To create a student user automatically, use the following line in the gitea >lifecycle setup script:
# create a student user account su - git -c '/usr/local/bin/gitea admin user create --admin --username student --password learn_ansible --email root@localhost'
The instruqt-jenkins-devops
image is pre-configured for the devops-controller
lab using the following:
- Dockerfile
- Jenkins CASC configuration file
- Jenkins Plugins list
- name: jenkins
image: quay.io/acme_corp/instruqt-jenkins-devops
ports:
- 8080
environment:
CONTROLLER_PASSWORD: learn_ansible
CONTROLLER_URL: https://controller
GITEA_SERVER_URL: http://gitea:3000
JENKINS_ADMIN_PASSWORD: learn_ansible
REPO_PASSWORD: learn_ansible
memory: 2048
- Environment Variables:
CONTROLLER_PASSWORD
: Controller password for Jenkins. Defaultlearn_ansible
JENKINS_ADMIN_PASSWORD
: Jenkins admin password. Defaultlearn_ansible
REPO_TOKEN
: Access token to pull repo code into JenkinsCONTROLLER_URL
: Controller URL. Defaulthttps://controller
GITEA_SERVER_URL
: Gitea server URL. Defaulthttp://gitea:3000
REPO_PASSWORD
: Gitea repo password. Defaultlearn_ansible