ravecat

ansible_jq_logs

May 31st, 2022
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.91 KB | None | 0 0
  1. Running with gitlab-runner 14.8.2 (c6e7e194)
  2.  on 404a730569a4 yvos-Tbk
  3. section_start:1654010321:prepare_executor
  4. Preparing the "docker" executor
  5. Using Docker executor with image registry.gitlab.com/rvct/infra/ansible:2.12 ...
  6. Authenticating with credentials from job payload (GitLab Registry)
  7. Pulling docker image registry.gitlab.com/rvct/infra/ansible:2.12 ...
  8. Using docker image sha256:1849c38ca96ef83c5c59e661e5e6d532640e981cfd139532d78817c6b2ea67f0 for registry.gitlab.com/rvct/infra/ansible:2.12 with digest registry.gitlab.com/rvct/infra/ansible@sha256:6de0aee54341a3f4821397ee0087f863dce638a8096cc25ea03a767c7110f97d ...
  9. section_end:1654010323:prepare_executor
  10. section_start:1654010323:prepare_script
  11. Preparing environment
  12. Running on runner-yvos-tbk-project-14893263-concurrent-0 via 261fe74ec6be...
  13. section_end:1654010324:prepare_script
  14. section_start:1654010324:get_sources
  15. Getting source from Git repository
  16. Fetching changes with git depth set to 50...
  17. Reinitialized existing Git repository in /builds/rvct/infra/.git/
  18. Checking out e631423d as master...
  19. Removing private.key
  20. Removing public.key
  21.  
  22. Skipping Git submodules setup
  23. section_end:1654010326:get_sources
  24. section_start:1654010326:step_script
  25. Executing "step_script" stage of the job script
  26. Using docker image sha256:1849c38ca96ef83c5c59e661e5e6d532640e981cfd139532d78817c6b2ea67f0 for registry.gitlab.com/rvct/infra/ansible:2.12 with digest registry.gitlab.com/rvct/infra/ansible@sha256:6de0aee54341a3f4821397ee0087f863dce638a8096cc25ea03a767c7110f97d ...
  27. $ cd ansible
  28. $ ansible-galaxy collection install -r requirements.yml
  29. Starting galaxy collection install process
  30. Process install dependency map
  31. Starting collection install process
  32. Downloading https://galaxy.ansible.com/download/community-digitalocean-1.16.0.tar.gz to /root/.ansible/tmp/ansible-local-12fge66zhi/tmpsxqm6k18/community-digitalocean-1.16.0-4om0ye9u
  33. Installing 'community.digitalocean:1.16.0' to '/root/.ansible/collections/ansible_collections/community/digitalocean'
  34. community.digitalocean:1.16.0 was installed successfully
  35. Downloading https://galaxy.ansible.com/download/ansible-posix-1.3.0.tar.gz to /root/.ansible/tmp/ansible-local-12fge66zhi/tmpsxqm6k18/ansible-posix-1.3.0-kctg63s5
  36. Installing 'ansible.posix:1.3.0' to '/root/.ansible/collections/ansible_collections/ansible/posix'
  37. ansible.posix:1.3.0 was installed successfully
  38. Downloading https://galaxy.ansible.com/download/community-general-4.7.0.tar.gz to /root/.ansible/tmp/ansible-local-12fge66zhi/tmpsxqm6k18/community-general-4.7.0-nsp5au0b
  39. Installing 'community.general:4.7.0' to '/root/.ansible/collections/ansible_collections/community/general'
  40. community.general:4.7.0 was installed successfully
  41. $ ansible-galaxy collection list
  42.  
  43. # /usr/share/ansible/collections/ansible_collections
  44. Collection Version
  45. ---------------- -------
  46. community.docker 2.3.0
  47.  
  48. # /root/.ansible/collections/ansible_collections
  49. Collection Version
  50. ---------------------- -------
  51. ansible.posix 1.3.0
  52. community.digitalocean 1.16.0
  53. community.general 4.7.0
  54. $ ansible-inventory -i inventory --list
  55. {
  56. "_meta": {
  57. "hostvars": {
  58. "node-0": {
  59. "ansible_host": "146.190.236.239",
  60. "ansible_host_key_checking": false,
  61. "ansible_python_interpreter": "/usr/bin/python3",
  62. "ansible_ssh_private_key_file": "{{ lookup('env', 'CI_SSH_PRIVATE_KEY') }}",
  63. "class": "basic",
  64. "distro": "debian",
  65. "do_disk": 25,
  66. "do_id": 296567371,
  67. "do_image": {
  68. "created_at": "2022-04-20T20:16:10Z",
  69. "description": "Debian 10 Image",
  70. "distribution": "Debian",
  71. "id": 106569146,
  72. "min_disk_size": 7,
  73. "name": "10 x64",
  74. "public": true,
  75. "regions": [
  76. "nyc3",
  77. "nyc1",
  78. "sfo1",
  79. "nyc2",
  80. "ams2",
  81. "sgp1",
  82. "lon1",
  83. "ams3",
  84. "fra1",
  85. "tor1",
  86. "sfo2",
  87. "blr1",
  88. "sfo3"
  89. ],
  90. "size_gigabytes": 0.35,
  91. "slug": "debian-10-x64",
  92. "status": "available",
  93. "tags": [],
  94. "type": "base"
  95. },
  96. "do_memory": 1024,
  97. "do_name": "node-0",
  98. "do_networks": {
  99. "v4": [
  100. {
  101. "gateway": "146.190.224.1",
  102. "ip_address": "146.190.236.239",
  103. "netmask": "255.255.240.0",
  104. "type": "public"
  105. },
  106. {
  107. "gateway": "10.110.0.1",
  108. "ip_address": "10.110.0.2",
  109. "netmask": "255.255.240.0",
  110. "type": "private"
  111. }
  112. ],
  113. "v6": []
  114. },
  115. "do_region": {
  116. "available": true,
  117. "features": [
  118. "backups",
  119. "ipv6",
  120. "metadata",
  121. "install_agent",
  122. "storage",
  123. "image_transfer"
  124. ],
  125. "name": "Amsterdam 3",
  126. "sizes": [
  127. "s-1vcpu-1gb",
  128. "s-1vcpu-1gb-amd",
  129. "s-1vcpu-1gb-intel",
  130. "s-1vcpu-2gb",
  131. "s-1vcpu-2gb-amd",
  132. "s-1vcpu-2gb-intel",
  133. "s-2vcpu-2gb",
  134. "s-2vcpu-2gb-amd",
  135. "s-2vcpu-2gb-intel",
  136. "s-2vcpu-4gb",
  137. "s-2vcpu-4gb-amd",
  138. "s-2vcpu-4gb-intel",
  139. "s-4vcpu-8gb",
  140. "c-2",
  141. "c2-2vcpu-4gb",
  142. "s-4vcpu-8gb-amd",
  143. "s-4vcpu-8gb-intel",
  144. "g-2vcpu-8gb",
  145. "gd-2vcpu-8gb",
  146. "s-8vcpu-16gb",
  147. "m-2vcpu-16gb",
  148. "c-4",
  149. "c2-4vcpu-8gb",
  150. "s-8vcpu-16gb-amd",
  151. "s-8vcpu-16gb-intel",
  152. "m3-2vcpu-16gb",
  153. "g-4vcpu-16gb",
  154. "so-2vcpu-16gb",
  155. "m6-2vcpu-16gb",
  156. "gd-4vcpu-16gb",
  157. "so1_5-2vcpu-16gb",
  158. "m-4vcpu-32gb",
  159. "c-8",
  160. "c2-8vcpu-16gb",
  161. "m3-4vcpu-32gb",
  162. "g-8vcpu-32gb",
  163. "so-4vcpu-32gb",
  164. "m6-4vcpu-32gb",
  165. "gd-8vcpu-32gb",
  166. "so1_5-4vcpu-32gb",
  167. "m-8vcpu-64gb",
  168. "c-16",
  169. "c2-16vcpu-32gb",
  170. "m3-8vcpu-64gb",
  171. "g-16vcpu-64gb",
  172. "so-8vcpu-64gb",
  173. "m6-8vcpu-64gb",
  174. "gd-16vcpu-64gb",
  175. "so1_5-8vcpu-64gb",
  176. "m-16vcpu-128gb",
  177. "c-32",
  178. "c2-32vcpu-64gb",
  179. "m3-16vcpu-128gb",
  180. "m-24vcpu-192gb",
  181. "g-32vcpu-128gb",
  182. "so-16vcpu-128gb",
  183. "m6-16vcpu-128gb",
  184. "gd-32vcpu-128gb",
  185. "m3-24vcpu-192gb",
  186. "g-40vcpu-160gb",
  187. "so1_5-16vcpu-128gb",
  188. "m-32vcpu-256gb",
  189. "gd-40vcpu-160gb",
  190. "so-24vcpu-192gb",
  191. "m6-24vcpu-192gb",
  192. "m3-32vcpu-256gb",
  193. "so1_5-24vcpu-192gb",
  194. "so-32vcpu-256gb",
  195. "m6-32vcpu-256gb",
  196. "so1_5-32vcpu-256gb"
  197. ],
  198. "slug": "ams3"
  199. },
  200. "do_size": {
  201. "available": true,
  202. "description": "Basic",
  203. "disk": 25,
  204. "memory": 1024,
  205. "price_hourly": 0.00744,
  206. "price_monthly": 5.0,
  207. "regions": [
  208. "ams3",
  209. "blr1",
  210. "fra1",
  211. "lon1",
  212. "nyc1",
  213. "nyc3",
  214. "sfo3",
  215. "sgp1",
  216. "tor1"
  217. ],
  218. "slug": "s-1vcpu-1gb",
  219. "transfer": 1.0,
  220. "vcpus": 1
  221. },
  222. "do_tags": [
  223. "bastion"
  224. ],
  225. "do_vcpus": 1,
  226. "do_volume_ids": [],
  227. "docker_users": [
  228. "{{ lookup('env', 'CI_BOT_ID') }}"
  229. ],
  230. "gitlab_api_token": "{{ lookup('env', 'CI_BOT_GITLAB_TOKEN') }}",
  231. "gitlab_registration_token": "{{ lookup('env', 'CI_GITLAB_GROUP_RUNNER_TOKEN') }}",
  232. "gitlab_runner_description": "runner for build and deploy applications",
  233. "gitlab_runner_tag_list": [
  234. "common"
  235. ],
  236. "runner_default_image": "docker:20.10.16-dind"
  237. }
  238. }
  239. },
  240. "all": {
  241. "children": [
  242. "bastion",
  243. "region_ams3",
  244. "ungrouped"
  245. ]
  246. },
  247. "bastion": {
  248. "hosts": [
  249. "node-0"
  250. ]
  251. },
  252. "region_ams3": {
  253. "hosts": [
  254. "node-0"
  255. ]
  256. }
  257. }
  258. $ mkdir -p ~/.ssh
  259. $ chmod 700 ~/.ssh
  260. $ eval $(ssh-agent -s)
  261. Agent pid 21
  262. $ echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
  263. $ cat "$CI_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
  264. Identity added: (stdin) (max@x230)
  265. $ cat "$CI_SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
  266. $ ansible-playbook -i inventory common.yml runner.yml
  267.  
  268. PLAY [install common dependencies] *********************************************
  269.  
  270. TASK [Gathering Facts] *********************************************************
  271. ok: [node-0]
  272.  
  273. TASK [common : add the support user cibot] *************************************
  274. ok: [node-0]
  275.  
  276. TASK [common : add SSH key to cibot] *******************************************
  277. ok: [node-0]
  278.  
  279. TASK [common : install required system packages] *******************************
  280. ok: [node-0]
  281.  
  282. PLAY [install docker] **********************************************************
  283.  
  284. TASK [Gathering Facts] *********************************************************
  285. ok: [node-0]
  286.  
  287. TASK [docker : install required system packages] *******************************
  288. ok: [node-0]
  289.  
  290. TASK [docker : add docker GPG apt key] *****************************************
  291. ok: [node-0]
  292.  
  293. TASK [docker : add docker repository] ******************************************
  294. ok: [node-0]
  295.  
  296. TASK [docker : update apt and install docker-ce] *******************************
  297. ok: [node-0]
  298.  
  299. TASK [docker : docker python dependencies] *************************************
  300. ok: [node-0]
  301.  
  302. TASK [docker : check users for docker group] ***********************************
  303. ok: [node-0] => {
  304. "msg": [
  305. "cibot"
  306. ]
  307. }
  308.  
  309. TASK [docker : add users to docker group] **************************************
  310. ok: [node-0] => (item=cibot)
  311.  
  312. PLAY RECAP *********************************************************************
  313. node-0 : ok=12 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
  314.  
  315.  
  316. PLAY [install gitlab-runner] ***************************************************
  317.  
  318. TASK [Gathering Facts] *********************************************************
  319. ok: [node-0]
  320.  
  321. TASK [runner : add gitlab-runner GPG key] **************************************
  322. ok: [node-0]
  323.  
  324. TASK [runner : add gitlab repository] ******************************************
  325. ok: [node-0]
  326.  
  327. TASK [runner : install gitlab-runner] ******************************************
  328. ok: [node-0]
  329.  
  330. TASK [runner : register gitlab runner] *****************************************
  331. ok: [node-0]
  332.  
  333. TASK [runner : runner registration output] *************************************
  334. ok: [node-0] => {
  335. "msg": {
  336. "changed": false,
  337. "failed": false,
  338. "msg": "No need to update the runner runner for build and deploy applications",
  339. "runner": {
  340. "access_level": "not_protected",
  341. "active": true,
  342. "architecture": "amd64",
  343. "contacted_at": "2022-05-31T15:14:32.626Z",
  344. "description": "runner for build and deploy applications",
  345. "groups": [
  346. {
  347. "id": 8162395,
  348. "name": "rvct",
  349. "web_url": "https://gitlab.com/groups/rvct"
  350. }
  351. ],
  352. "id": 14908644,
  353. "ip_address": "146.190.236.239",
  354. "is_shared": false,
  355. "locked": false,
  356. "maximum_timeout": 3600,
  357. "name": null,
  358. "online": true,
  359. "paused": false,
  360. "platform": "linux",
  361. "projects": [],
  362. "revision": "c6bb62f6",
  363. "run_untagged": false,
  364. "runner_type": "group_type",
  365. "status": "online",
  366. "tag_list": [
  367. "common"
  368. ],
  369. "version": "14.10.0"
  370. }
  371. }
  372. }
  373.  
  374. TASK [runner : get runner creation status] *************************************
  375. ok: [node-0]
  376.  
  377. TASK [runner : get token for new runner] ***************************************
  378. skipping: [node-0]
  379.  
  380. TASK [runner : get registered runner list raw] *********************************
  381. changed: [node-0]
  382.  
  383. TASK [runner : get registered runner list] *************************************
  384. ok: [node-0]
  385.  
  386. TASK [runner : registered runner list output] **********************************
  387. ok: [node-0] => {
  388. "msg": "{\"arch\":\"amd64\",\"level\":\"info\",\"msg\":\"Runtime platform\",\"os\":\"linux\",\"pid\":25024,\"revision\":\"c6bb62f6\",\"time\":\"2022-05-31T15:19:49Z\",\"version\":\"14.10.0\"}\n{\"ConfigFile\":\"/etc/gitlab-runner/config.toml\",\"level\":\"info\",\"msg\":\"Listing configured runners\",\"time\":\"2022-05-31T15:19:49Z\"}\n{\"Executor\":\"docker\",\"Token\":\"UxnTUUiAfj1ZZgAcUXZh\",\"URL\":\"https://gitlab.com\",\"level\":\"info\",\"msg\":\"common\",\"time\":\"2022-05-31T15:19:49Z\"}"
  389. }
  390.  
  391. TASK [runner : get token for active runner] ************************************
  392. changed: [node-0]
  393.  
  394. TASK [runner : registered runner token output] *********************************
  395. ok: [node-0] => {
  396. "msg": {
  397. "changed": true,
  398. "cmd": [
  399. "echo",
  400. "{arch:amd64,level:info,msg:Runtime",
  401. "platform,os:linux,pid:25024,revision:c6bb62f6,time:2022-05-31T15:19:49Z,version:14.10.0}\n{ConfigFile:/etc/gitlab-runner/config.toml,level:info,msg:Listing",
  402. "configured",
  403. "runners,time:2022-05-31T15:19:49Z}\n{Executor:docker,Token:UxnTUUiAfj1ZZgAcUXZh,URL:https://gitlab.com,level:info,msg:common,time:2022-05-31T15:19:49Z}",
  404. "|",
  405. "jq",
  406. "-r",
  407. "select(.Token != null) | .Token"
  408. ],
  409. "delta": "0:00:00.005415",
  410. "end": "2022-05-31 15:19:50.863885",
  411. "failed": false,
  412. "msg": "",
  413. "rc": 0,
  414. "start": "2022-05-31 15:19:50.858470",
  415. "stderr": "",
  416. "stderr_lines": [],
  417. "stdout": "{arch:amd64,level:info,msg:Runtime platform,os:linux,pid:25024,revision:c6bb62f6,time:2022-05-31T15:19:49Z,version:14.10.0}\n{ConfigFile:/etc/gitlab-runner/config.toml,level:info,msg:Listing configured runners,time:2022-05-31T15:19:49Z}\n{Executor:docker,Token:UxnTUUiAfj1ZZgAcUXZh,URL:https://gitlab.com,level:info,msg:common,time:2022-05-31T15:19:49Z} | jq -r select(.Token != null) | .Token",
  418. "stdout_lines": [
  419. "{arch:amd64,level:info,msg:Runtime platform,os:linux,pid:25024,revision:c6bb62f6,time:2022-05-31T15:19:49Z,version:14.10.0}",
  420. "{ConfigFile:/etc/gitlab-runner/config.toml,level:info,msg:Listing configured runners,time:2022-05-31T15:19:49Z}",
  421. "{Executor:docker,Token:UxnTUUiAfj1ZZgAcUXZh,URL:https://gitlab.com,level:info,msg:common,time:2022-05-31T15:19:49Z} | jq -r select(.Token != null) | .Token"
  422. ]
  423. }
  424. }
  425.  
  426. PLAY RECAP *********************************************************************
  427. node-0 : ok=24 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
  428.  
  429. section_end:1654010391:step_script
  430. section_start:1654010391:cleanup_file_variables
  431. Cleaning up project directory and file based variables
  432. section_end:1654010391:cleanup_file_variables
  433. Job succeeded
Advertisement
Add Comment
Please, Sign In to add comment