-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provisioning/ansible/add languages (#134)
* feat: 多言語参考実装に対応 * feat: perl longdouble対応 * feat: packerを2段階で実施できるようにした (#142) * feat: packer 1.6.0対応と高速化 (#144) * fix: packer fix * chore: ansible高速化 * feat: perlのansible追加 (#145) * wip: perl追加 * feat: perl のpackage installを追加 * feat: add isuumo perl setting * fix: password (#150) * feat: ruby settings (#148) Co-authored-by: yuya_mizuki <[email protected]> * feature:deno (#149) * fix: ruby service name * fix: install user * fix: cartonを使わないように修正,不要なchownを削除 (#151) * fix: deno * fix: ruby image Co-authored-by: yuya_mizuki <[email protected]> Co-authored-by: Katsuya Miyachi <[email protected]>
- Loading branch information
1 parent
29934c2
commit eba6d20
Showing
24 changed files
with
555 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
[defaults] | ||
private_key_file=~/.ssh/id_rsa | ||
callback_whitelist = profile_tasks | ||
|
||
|
||
[ssh_connection] | ||
pipeline = false | ||
ssh_args = -o ControlMaster=auto -o ControlPersist=300s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
- role: common | ||
- role: langs | ||
- role: web | ||
- role: remove | ||
# - role: remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- hosts: all | ||
become: yes | ||
become_user: root | ||
roles: | ||
- role: web | ||
- role: bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- hosts: all | ||
become: yes | ||
become_user: root | ||
roles: | ||
- role: web | ||
- role: remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- hosts: all | ||
become: yes | ||
become_user: root | ||
roles: | ||
- role: common | ||
- role: langs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
name: isucon | ||
uid: 1100 | ||
group: isucon | ||
password: isucon | ||
password: $6$a3ehJA1nkzvm3EiW$3vTxieCi5P8brkaJzzBDji3wyjJRQYWBtcRgf27f2BRdEMKeM7Pycb2JZ6eTdSw2/hqLh59xVH7PTr6r9wNiQ0 | ||
home: /home/isucon | ||
shell: /bin/bash | ||
state: present | ||
|
@@ -38,39 +38,45 @@ | |
replace: 'http://ftp.jaist.ac.jp/pub/Linux/ubuntu/' | ||
backup: yes | ||
|
||
- name: Check isucon10-qualify | ||
become: no | ||
stat: | ||
path: "/home/isucon/isucon10-qualify" | ||
register: chk_file | ||
|
||
- name: Delete isucon10-qualify if exists | ||
- name: Install Package(Build) | ||
become: yes | ||
become_user: root | ||
file: | ||
path: /home/isucon/isucon10-qualify | ||
state: absent | ||
when: chk_file.stat.exists | ||
apt: | ||
name: | ||
- libssl-dev | ||
- libreadline-dev | ||
- gcc | ||
- make | ||
- libffi-dev | ||
- zlib1g-dev | ||
- unzip | ||
- pkg-config | ||
- autoconf | ||
- automake | ||
- build-essential | ||
- nginx | ||
- libxml2-dev | ||
- libsqlite3-dev | ||
- libbz2-dev | ||
- libkrb5-dev | ||
- libcurl4-openssl-dev | ||
- libpng-dev | ||
- libjpeg-dev | ||
- libfreetype6-dev | ||
- libc-client2007e-dev | ||
- libxslt-dev | ||
- libonig-dev | ||
- libtidy-dev | ||
- libzip-dev | ||
- default-mysql-client | ||
- default-libmysqlclient-dev | ||
update_cache: yes | ||
|
||
- name: Clone isucon10-qualify | ||
become: no | ||
- name: install xbuild | ||
become: yes | ||
become_user: isucon | ||
git: | ||
repo: [email protected]:isucon/isucon10-qualify.git | ||
repo: https://github.com/tagomoris/xbuild.git | ||
dest: /tmp/xbuild | ||
version: master | ||
dest: /tmp/isucon10-qualify | ||
accept_hostkey: yes | ||
|
||
- name: Chgroup sisucon10-qualify repo | ||
become: yes | ||
become_user: root | ||
file: | ||
path: /tmp/isucon10-qualify | ||
state: directory | ||
owner: isucon | ||
group: isucon | ||
recurse: yes | ||
|
||
- name: Deploy isucon10-qualify | ||
become: yes | ||
become_user: isucon | ||
command: mv /tmp/isucon10-qualify /home/isucon/isucon10-qualify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
provisioning/ansible/roles/web-perl/files/isuumo.perl.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=isuumo.perl | ||
|
||
[Service] | ||
WorkingDirectory=/home/isucon/isuumo/webapp/perl | ||
EnvironmentFile=/home/isucon/env.sh | ||
|
||
User=isucon | ||
Group=isucon | ||
ExecStart=/home/isucon/local/perl/bin/plackup -s Starlet -p 1323 app.psgi | ||
|
||
Restart = always | ||
Type = simple | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: Download cpm | ||
get_url: | ||
url: https://raw.githubusercontent.com/skaji/cpm/master/cpm | ||
dest: /home/isucon/local/perl/bin/cpm | ||
mode: '0755' | ||
|
||
- name: Install isuumo.perl Pacakges | ||
become: yes | ||
become_user: isucon | ||
environment: | ||
PATH: "/home/isucon/local/go/bin:/home/isucon/local/node/bin:/home/isucon/local/ruby/bin:/home/isucon/local/python/bin:/home/isucon/local/perl/bin:/home/isucon/local/php/bin:/home/isucon/.cargo/bin:/home/isucon/.deno/bin:/home/isucon/bin:/home/isucon/.local/bin:/usr/bin:/sbin:/bin" | ||
args: | ||
chdir: /home/isucon/isuumo/webapp/perl | ||
shell: | | ||
/home/isucon/local/perl/bin/cpm install -g --show-build-log-on-failure | ||
- name: Copy Service file | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/etc/systemd/system" | ||
owner: "root" | ||
group: "root" | ||
mode: "0644" | ||
with_items: | ||
- isuumo.perl.service |
18 changes: 18 additions & 0 deletions
18
provisioning/ansible/roles/web-ruby/files/isucon-ruby.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=isucon-ruby | ||
After=syslog.target | ||
|
||
[Service] | ||
WorkingDirectory=/home/isucon/isuumo/webapp/ruby | ||
EnvironmentFile=/home/isucon/env.sh | ||
PIDFile=/home/isucon/isuumo/webapp/ruby/server.pid | ||
|
||
User=isucon | ||
Group=isucon | ||
ExecStart=/home/isucon/local/ruby/bin/bundle exec unicorn -c unicorn.conf.rb | ||
ExecStop=/bin/kill -s QUIT $MAINPID | ||
|
||
Restart = always | ||
Type = simple | ||
[Install] | ||
WantedBy=multi-user.target |
Oops, something went wrong.