第8弾 週末ランサーズ「Infrastructure as Code」 ~ ハンズオン手順 ~
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
def url = 'http://example.com/' | |
Authenticator.default = { | |
[ | |
// user | |
System.env.U, | |
// password | |
System.env.P.toCharArray() | |
] | |
} as Authenticator |
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
import groovy.json.* | |
def API_KEY = 'XXXXXXXXXXXXXXXXXXXX' | |
def DIAGRAMS_URL = 'https://cacoo.com/api/v1/diagrams.json' | |
def DELETE_DIAGRAM_URL = 'https://cacoo.com/api/v1/diagrams/' | |
def slurper = new JsonSlurper() | |
def apiKeyParameter = "apiKey=${API_KEY}" | |
// 削除対象の図一覧の取得 |
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
#!/bin/bash | |
SESSION_NAME=tmux-ssh | |
INITIAL_WINDOW_NAME=tmux-ssh-window | |
### セッションの作成 | |
tmux start-server | |
tmux new-session -d -n $INITIAL_WINDOW_NAME -s $SESSION_NAME | |
### 引数で与えられたホストにssh接続 |
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
if (manager.build.result.isWorseOrEqualTo(hudson.model.Result.UNSTABLE)) { | |
manager.listener.logger.println("ビルドを保存します") | |
manager.build.keepLog() | |
} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
markdown: { | |
all: { | |
files: [ | |
{ | |
expand: true, | |
src: ['**/*.md', '!node_modules/**/*.md'], | |
ext: '.html' | |
} |
第8弾 週末ランサーズ「Infrastructure as Code」 ~ ハンズオン手順 ~
本来なら Ansible を題材にしたいところですが、Ansible の実行環境を整えるのは環境依存のところもあってちょっと手間がかかるので、今回は Chef をとりあげます。
第8弾 週末ランサーズ「Infrastructure as Code」 ~ ハンズオン手順 ~
serverspec は Ruby のライブラリなので、Ruby の環境が必要となります。
第8弾 週末ランサーズ「Infrastructure as Code」 ~ ハンズオン手順 ~
Jenkins を実行するには Java が必要となります。PATH も忘れずに通してください。インストーラはUSBメモリに入っています。
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
hackmdPostgres: | |
image: postgres | |
environment: | |
- POSTGRES_USER=hackmd | |
- POSTGRES_PASSWORD=hackmdpass | |
- POSTGRES_DB=hackmd | |
hackmd: | |
image: hackmdio/hackmd:0.4.6 | |
environment: | |
- POSTGRES_USER=hackmd |