Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
O
ops
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Infrastructure
  • ops
  • Wiki
  • continuous integration

Last edited by totten Jan 25, 2018
Page history

continuous integration

  • Jenkins configuration
  • MySQL Ramdisk: systemd-managed, custom data directory
  • MySQL Ramdisk: amp-managed, sudo-less

Jenkins configuration

See: continuous-integration.md

MySQL Ramdisk: systemd-managed, custom data directory

  • Strength: Participate in systemd process supervision.
  • Weakness: Only works on systems with systemd. More manual config.

test-ubu1204-5 is actually an Ubuntu 14.04 server, on which the systemd package was installed. It's not really clear what systemd does, but at least journalctl -f works. It doesn't seem to work for launching processes.

Random notes:

mysql_install_db
chgrp mysql /mnt/mysql
chmod g+rw /mnt/mysql
adduser jenkins mysql

I wasn't sure if buildkit would allow using a DSN with an empty root password, so I ran:

ln -s /mnt/mysql/mysqld.sock /var/run/mysqld/mysqld.sock
mysql_secure_installation

As jenkins, change the mysql config:

amp config:set --db_type=mysql --mysql_dsn=mysql://root:secret@127.0.0.1:3306

MySQL Ramdisk: amp-managed, sudo-less

  • Strength: Works on most Linux and OSX builds.
  • Weakness No process supervision.

On test-ubu1204-5, the ramdisk uses this arrangement:

  • Declare a ramdisk for /mnt/mysql in /etc/fstab. This allows it to startup during boot without any special user-privileges. (No root or sudo.)
  • The jenkins user has amp config set with these options:

| db_type | mysql_ram_disk | How to connect to the database as admin [mysql_dsn,mysql_mycnf,mysql_ram_disk,mysql_osx_ram_disk,pg_dsn] | | ram_disk_dir | /mnt/mysql | Directory to create as a RAM disk | | ram_disk_size | 500 | Amount of space to allocate for ramdisk (MB) | | ram_disk_type | manual | Type of RAM disk [auto,linux,osx,manual] |

Some interpretation:

  • db_type=mysql_ram_disk means that amp will auto-create the mysql data files and start the mysqld (on-demand)
  • ram_disk_dir=/mny/mysql and ram_disk_type=manual means that it will use the ramdisk that's been already created. (By default, mysql_ram_disk tries to create a new ramdisk, but that requires root/sudo on Linux, so we don't use it on the shared server)

Amp boots MySQL on demand, when the user runs civibuild or amp create.

mattermost reference

Clone repository
  • 2017 hosting brainstorm
  • confluence sunset
  • continuous integration
  • demo
  • dev sites
  • extdir
  • forum sunset
  • gitlab roadmap
  • Home
  • jira to gitlab migration
  • ldapcivi
  • login problems with gitlab
  • mattermost upgrades
  • spark
  • svn sunset