test.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. ---
  2. - hosts: all
  3. become: yes
  4. become_user: root
  5. become_method: sudo
  6. gather_facts: yes
  7. vars:
  8. raft_repo: "https://github.com/yossigo/redisraft"
  9. raft_branch: "cluster"
  10. mypkgs:
  11. - git
  12. - gcc
  13. - make
  14. - rpm-build
  15. - autoconf
  16. - automake
  17. - libedit
  18. - openssl-devel
  19. - epel-release
  20. - libbsd-devel
  21. - libbsd
  22. - curl
  23. - gnupg2
  24. - libevent-devel
  25. pre_tasks:
  26. - name: Enable epel-release
  27. yum:
  28. name: epel-release
  29. state: latest
  30. - name: RedHat Dev Tools
  31. yum:
  32. name: "@Development tools"
  33. state: present
  34. - name: RedHat Packages
  35. package:
  36. name: "{{ mypkgs }}"
  37. - name: Get cmake version
  38. unarchive:
  39. src: "https://cmake.org/files/v3.19/cmake-3.19.1.tar.gz"
  40. dest: /usr/local/share/
  41. remote_src: yes
  42. - name: Bootstrap cmake
  43. command: "./bootstrap"
  44. args:
  45. chdir: /usr/local/share/cmake-3.19.1
  46. creates: /usr/local/share/cmake-3.19.1/Makefile
  47. - name: Cmake - Build install
  48. make:
  49. chdir: /usr/local/share/cmake-3.19.1
  50. target: install
  51. - name: Link cmake
  52. file:
  53. src: /usr/local/bin/cmake
  54. dest: /usr/bin/cmake
  55. state: link
  56. tasks:
  57. - name: raft - clone the github repo
  58. git:
  59. repo: "{{raft_repo}}"
  60. dest: /home/redis/redisraft
  61. version: "{{raft_branch}}"
  62. recursive: yes
  63. update: yes
  64. force: yes
  65. - name: raft - make
  66. make:
  67. chdir: /home/redis/redisraft
  68. - name: checkout redis git repo
  69. git:
  70. repo: 'https://github.com/redis/redis'
  71. dest: /home/redis/redis
  72. - name: redis - Build the default target
  73. make:
  74. chdir: /home/redis/redis
  75. - name: checkout memtier_benchmark git repo
  76. git:
  77. repo: 'https://github.com/RedisLabs/memtier_benchmark'
  78. dest: /home/redis/memtier_benchmark
  79. - name: memtier - Run the autoconf
  80. command: autoreconf -ivf
  81. args:
  82. chdir: /home/redis/memtier_benchmark
  83. creates: /home/redis/memtier_benchmark/configure
  84. - name: memtier - Run the configure script first
  85. command: ./configure
  86. args:
  87. chdir: /home/redis/memtier_benchmark
  88. creates: /home/redis/memtier_benchmark/Makefile
  89. - name: memtier - Build the default target
  90. make:
  91. chdir: /home/redis/memtier_benchmark
  92. - name: Run 'memtier_benchmark install' target as root
  93. make:
  94. chdir: /home/redis/memtier_benchmark
  95. target: install
  96. become: yes
  97. roles:
  98. - {
  99. role: rvm.ruby,
  100. rvm1_rubies: ['ruby-2.7'],
  101. rvm1_install_flags: '--auto-dotfiles',
  102. rvm1_install_path: /usr/local/rvm,
  103. rvm1_user: 'root',
  104. rvm1_bundler_install: True
  105. }
  106. # post_tasks:
  107. #
  108. # - name: Install FPM
  109. # community.general.gem:
  110. # name: fpm
  111. # state: present