Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run e2e tests #148

Merged
merged 12 commits into from
Nov 26, 2020
Merged

ci: run e2e tests #148

merged 12 commits into from
Nov 26, 2020

Conversation

kuisathaverat
Copy link
Contributor

It adds a stage to run the e2e teste

@kuisathaverat kuisathaverat added ci Team:Automation Label for the Observability productivity team labels Nov 25, 2020
@kuisathaverat kuisathaverat requested review from shahzad31 and a team November 25, 2020 11:53
@kuisathaverat kuisathaverat self-assigned this Nov 25, 2020
.ci/Jenkinsfile Outdated Show resolved Hide resolved
@apmmachine
Copy link

apmmachine commented Nov 25, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #148 updated

  • Start Time: 2020-11-25T20:12:14.395+0000

  • Duration: 16 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 45
Skipped 0
Total 45

.ci/Jenkinsfile Outdated Show resolved Hide resolved
@kuisathaverat
Copy link
Contributor Author

I have to workaround this

Exiting: error loading config file: config file ("heartbeat.yml") must be owned by the user identifier (uid=1000) or root

@kuisathaverat
Copy link
Contributor Author

kuisathaverat commented Nov 25, 2020

I have no Idea what is this new error about

Exiting: exit status 243

--strict.perms=false does not work

@kuisathaverat
Copy link
Contributor Author

after enabling --environment container I have more data

synthetics       | 2020-11-25T19:30:10.914Z	INFO	instance/beat.go:645	Home path: [/usr/share/heartbeat] Config path: [/usr/share/heartbeat] Data path: [/usr/share/heartbeat/data] Logs path: [/usr/share/heartbeat/logs]
synthetics       | 2020-11-25T19:30:10.920Z	INFO	instance/beat.go:653	Beat ID: e59132b6-1696-48f4-ab04-0e54aa436595
synthetics       | 2020-11-25T19:30:10.920Z	INFO	[beat]	instance/beat.go:981	Beat info	{"system_info": {"beat": {"path": {"config": "/usr/share/heartbeat", "data": "/usr/share/heartbeat/data", "home": "/usr/share/heartbeat", "logs": "/usr/share/heartbeat/logs"}, "type": "heartbeat", "uuid": "e59132b6-1696-48f4-ab04-0e54aa436595"}}}
synthetics       | 2020-11-25T19:30:10.920Z	INFO	[beat]	instance/beat.go:990	Build info	{"system_info": {"build": {"commit": "a0f845abd970614e624588ff46bda0095fbed814", "libbeat": "7.10.0", "time": "2020-11-05T23:07:08.000Z", "version": "7.10.0"}}}
synthetics       | 2020-11-25T19:30:10.921Z	INFO	[beat]	instance/beat.go:993	Go runtime info	{"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":4,"version":"go1.14.7"}}}
synthetics       | 2020-11-25T19:30:10.922Z	INFO	[beat]	instance/beat.go:997	Host info	{"system_info": {"host": {"architecture":"x86_64","boot_time":"2020-11-25T18:29:21Z","containerized":true,"name":"310f7a894acb","ip":["127.0.0.1/8","172.23.0.3/16"],"kernel_version":"5.4.0-1029-gcp","mac":["02:42:ac:17:00:03"],"os":{"family":"redhat","platform":"centos","name":"CentOS Linux","version":"7 (Core)","major":7,"minor":8,"patch":2003,"codename":"Core"},"timezone":"UTC","timezone_offset_sec":0,"id":"42ce656e21e705a9f1fe331a4a1a6a9a"}}}
synthetics       | 2020-11-25T19:30:10.922Z	INFO	[beat]	instance/beat.go:1026	Process info	{"system_info": {"process": {"capabilities": {"inheritable":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"permitted":["net_raw"],"effective":["net_raw"],"bounding":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"ambient":null}, "cwd": "/usr/share/heartbeat", "exe": "/usr/share/heartbeat/heartbeat", "name": "heartbeat", "pid": 7, "ppid": 1, "seccomp": {"mode":"filter","no_new_privs":false}, "start_time": "2020-11-25T19:30:09.970Z"}}}
synthetics       | 2020-11-25T19:30:10.922Z	INFO	instance/beat.go:299	Setup Beat: heartbeat; Version: 7.10.0
synthetics       | 2020-11-25T19:30:10.922Z	INFO	[index-management]	idxmgmt/std.go:184	Set output.elasticsearch.index to 'heartbeat-7.10.0' as ILM is enabled.
synthetics       | 2020-11-25T19:30:10.923Z	INFO	eslegclient/connection.go:99	elasticsearch url: http://elasticsearch:9200
synthetics       | 2020-11-25T19:30:10.923Z	INFO	[publisher]	pipeline/module.go:113	Beat name: 310f7a894acb
synthetics       | 2020-11-25T19:30:10.923Z	INFO	instance/beat.go:455	heartbeat start running.
synthetics       | 2020-11-25T19:30:10.924Z	INFO	beater/heartbeat.go:83	Please note, this is an experimental, unsupported version of heartbeat for the purpose of demonstrating synthetic journeys!
synthetics       | 2020-11-25T19:30:10.924Z	INFO	beater/heartbeat.go:84	heartbeat is running! Hit CTRL-C to stop it.
synthetics       | 2020-11-25T19:30:10.923Z	INFO	[monitoring]	log/log.go:118	Starting metrics logging every 30s
synthetics       | 2020-11-25T19:30:10.924Z	INFO	monitors/factory.go:108	Client connection with: beat.ClientConfig{PublishMode:0x0, Processing:beat.ProcessingConfig{EventMetadata:common.EventMetadata{Fields:null, FieldsUnderRoot:false, Tags:[]string(nil)}, Meta:null, Fields:null, DynamicFields:(*common.MapStrPointer)(nil), Processor:beat.ProcessorList(nil), KeepNull:false, DisableHost:false, Private:interface {}(nil)}, CloseRef:beat.CloseRef(nil), WaitClose:0, ACKHandler:beat.ACKer(nil), Events:beat.ClientEventer(nil)}
synthetics       | 2020-11-25T19:30:10.925Z	WARN	beater/heartbeat.go:183	Listing suite%!(EXTRA string=/opt/elastic-synthetics/examples/todos)
synthetics       | 2020-11-25T19:30:10.925Z	INFO	synthexec/synthexec.go:322	Running /usr/share/heartbeat/.node/node/bin/npm install in /opt/elastic-synthetics/examples/todos
synthetics       | 2020-11-25T19:30:10.930Z	INFO	synthexec/synthexec.go:174	Running command: /usr/share/heartbeat/.node/node/bin/elastic-synthetics --inline --screenshots --json --network --outfd 3 in directory: ''
synthetics       | 2020-11-25T19:30:10.934Z	INFO	cfgfile/reload.go:164	Config reloader started
synthetics       | 2020-11-25T19:30:10.935Z	INFO	cfgfile/reload.go:224	Loading of config files completed.
synthetics       | 2020-11-25T19:30:11.945Z	INFO	[publisher_pipeline_output]	pipeline/output.go:143	Connecting to backoff(elasticsearch(http://elasticsearch:9200))
synthetics       | 2020-11-25T19:30:11.945Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
synthetics       | 2020-11-25T19:30:11.946Z	INFO	[publisher]	pipeline/retry.go:223	  done
synthetics       | 2020-11-25T19:30:13.246Z	ERROR	[publisher_pipeline_output]	pipeline/output.go:154	Failed to connect to backoff(elasticsearch(http://elasticsearch:9200)): Get "http://elasticsearch:9200": dial tcp 172.23.0.2:9200: connect: connection refused
synthetics       | 2020-11-25T19:30:13.247Z	INFO	[publisher_pipeline_output]	pipeline/output.go:145	Attempting to reconnect to backoff(elasticsearch(http://elasticsearch:9200)) with 1 reconnect attempt(s)
synthetics       | 2020-11-25T19:30:13.248Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
synthetics       | 2020-11-25T19:30:13.252Z	INFO	[publisher]	pipeline/retry.go:223	  done
synthetics       | 2020-11-25T19:30:16.916Z	ERROR	[publisher_pipeline_output]	pipeline/output.go:154	Failed to connect to backoff(elasticsearch(http://elasticsearch:9200)): Get "http://elasticsearch:9200": dial tcp 172.23.0.2:9200: connect: connection refused
synthetics       | 2020-11-25T19:30:16.916Z	INFO	[publisher_pipeline_output]	pipeline/output.go:145	Attempting to reconnect to backoff(elasticsearch(http://elasticsearch:9200)) with 2 reconnect attempt(s)
synthetics       | 2020-11-25T19:30:16.917Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
synthetics       | 2020-11-25T19:30:16.917Z	INFO	[publisher]	pipeline/retry.go:223	  done
synthetics       | 2020-11-25T19:30:19.232Z	INFO	synthexec/synthexec.go:324	Ran /usr/share/heartbeat/.node/node/bin/npm install got npm WARN checkPermissions Missing write access to /opt/elastic-synthetics/examples/todos
synthetics       | npm ERR! code EACCES
synthetics       | npm ERR! syscall access
synthetics       | npm ERR! path /opt/elastic-synthetics/examples/todos
synthetics       | npm ERR! errno -13
synthetics       | npm ERR! Error: EACCES: permission denied, access '/opt/elastic-synthetics/examples/todos'
synthetics       | npm ERR!  [Error: EACCES: permission denied, access '/opt/elastic-synthetics/examples/todos'] {
synthetics       | npm ERR!   errno: -13,
synthetics       | npm ERR!   code: 'EACCES',
synthetics       | npm ERR!   syscall: 'access',
synthetics       | npm ERR!   path: '/opt/elastic-synthetics/examples/todos'
synthetics       | npm ERR! }
synthetics       | npm ERR! 
synthetics       | npm ERR! The operation was rejected by your operating system.
synthetics       | npm ERR! It is likely you do not have the permissions to access this file as the current user
synthetics       | npm ERR! 
synthetics       | npm ERR! If you believe this might be a permissions issue, please double-check the
synthetics       | npm ERR! permissions of the file and its containing directories, or try running
synthetics       | npm ERR! the command again as root/Administrator.
synthetics       | 
synthetics       | npm ERR! A complete log of this run can be found in:
synthetics       | npm ERR!     /usr/share/heartbeat/.npm/_logs/2020-11-25T19_30_19_137Z-debug.log
synthetics       | 
synthetics       | 2020-11-25T19:30:19.232Z	INFO	cfgfile/reload.go:227	Dynamic config reloader stopped
synthetics       | 2020-11-25T19:30:19.241Z	INFO	[monitoring]	log/log.go:153	Total non-zero metrics	{"monitoring": {"metrics": {"beat":{"cgroup":{"cpu":{"id":"310f7a894acb3bd4934d572160a38059bc2749c96726b48c6f307670b9293b12"},"cpuacct":{"id":"310f7a894acb3bd4934d572160a38059bc2749c96726b48c6f307670b9293b12"},"memory":{"id":"310f7a894acb3bd4934d572160a38059bc2749c96726b48c6f307670b9293b12"}},"cpu":{"system":{"ticks":20,"time":{"ms":25}},"total":{"ticks":90,"time":{"ms":100},"value":90},"user":{"ticks":70,"time":{"ms":75}}},"handles":{"limit":{"hard":1048576,"soft":1048576},"open":12},"info":{"ephemeral_id":"4fa55a26-d0cd-4a05-bd76-1284c326bdfd","uptime":{"ms":8367}},"memstats":{"gc_next":19567392,"memory_alloc":10522728,"memory_total":16995504,"rss":48386048},"runtime":{"goroutines":17}},"heartbeat":{"browser":{"endpoint_starts":1,"monitor_starts":1},"scheduler":{"jobs":{"active":1},"tasks":{"active":1}}},"libbeat":{"config":{"module":{"running":0},"reloads":1,"scans":1},"output":{"type":"elasticsearch"},"pipeline":{"clients":1,"events":{"active":2,"published":2,"retry":2,"total":2}}},"system":{"cpu":{"cores":4},"load":{"1":5.29,"15":5.27,"5":5.74,"norm":{"1":1.3225,"15":1.3175,"5":1.435}}}}}}
synthetics       | 2020-11-25T19:30:19.242Z	INFO	[monitoring]	log/log.go:154	Uptime: 8.373217134s
synthetics       | 2020-11-25T19:30:19.243Z	INFO	[monitoring]	log/log.go:131	Stopping metrics logging.
synthetics       | 2020-11-25T19:30:19.244Z	INFO	instance/beat.go:461	heartbeat stopped.
synthetics       | 2020-11-25T19:30:19.245Z	ERROR	instance/beat.go:956	Exiting: exit status 243
synthetics       | Exiting: exit status 243
synthetics exited with code 1

@kuisathaverat
Copy link
Contributor Author

it was tough but it works now

@shahzad31
Copy link
Contributor

Awesome and quick work !!

@kuisathaverat
Copy link
Contributor Author

I will grab the logs of the containers for debugging issues in a followup PR

@kuisathaverat kuisathaverat merged commit 1375d46 into elastic:master Nov 26, 2020

export NVM_DIR="${HOME}/.nvm"
[ -s "${NVM_DIR}/nvm.sh" ] && \\. "${NVM_DIR}/nvm.sh"
nvm install --lts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to test it on the version we use in synthetics image

&& curl https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-x64.tar.xz | tar -xJ --strip 1 -C node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants