Question 1. What Is The Added Value Of Software Factory ?
Answer :
If you are not sure about using Software Factory, here are some perks that might convince you:
Question 2. Can I Disable Gerrit ?
Answer :
As of now, Gerrit is mandatory in Software Factory for a couple of reasons:
Gerrit will be made optional in a future release [1] of Software Factory
Note: that it is possible to use Software Factory as a third party CI for an external Gerrit or a GitHub organization. In this case, the gerrit server is only used to host the config repository, and operators can bypass it entirely by pushing config repository changes with the “git push” command instead of “git review”.
Question 3. Why Can’t I +2 A Change After Being Added To The Core Group ?
Answer :
This may happen because of web browser cache issues. Remove all cookies then log out and log in again to refresh your gerrit privileges.
Question 4. Why Does My Build Fail With The “not_registered” Error ?
Answer :
This error happens when zuul can’t build a job. Most of the time it’s because:
Question 5. Why Does My Build Stay In “queued” State ?
Answer :
This happens when no worker nodes are available to execute a build:
Question 6. How Can I Change My Deployment’s Hostname?
Answer :
You can change the hostname after the deployment by changing the fqdn parameter in /etc/software-factory/sfconfig.yaml, removing the existing SSL certificates (only required if running functional tests and using the default self-signed certificates) and running sfconfig again:
sed -i -e 's/fqdn:.*/fqdn: mynewhostname.com/g' /etc/software-factory/sfconfig.yaml
sfconfig
note: that you might need to update URLs in other places as well, for example git remote urls in .gitreview and .git/config files for repositories hosted on Software Factory.
Question 7. How To Setup A Mirror On Swift For External Dependencies ?
Answer :
The mirror service uses the mirror2swift utility to provide a local cache for external ressources. For example we use it to mirror RPM repositories, which speeds up building times of our test environments.
To enable the mirror service, you need to configure a swift container in sfconfig.yaml and then specify the URL to mirror in the config-repo:
Add the mirror role to /etc/software-factory/arch.yaml
Configure the mirror role in /etc/software-factory/sfconfig.yaml
Run sfconfig
Edit the mirror configuration template provided in the mirrors directory of the config repository.
When periodic_update is set, the mirror will be updated periodically through a dedicated zuul pipeline. The status of the update can be checked like any other CI build. Otherwise, to update the cache manually, this command needs to be executed:
sudo -u mirror2swift mirror2swift /var/lib/mirror2swift/config.yaml
sfconfig.yaml example:
mirrors:
periodic_update: '0 0 * * *'
swift_mirror_url: http://swift:8080/v1/AUTH_uuid/repomirror/
swift_mirror_tempurl_key: TEMP_URL_KEY
The swift_mirror_url needs to be the canonical, fully qualified url of the target container. The swift_mirror_tempurl_key needs to be a tempurl key with writing rights. The periodic_update needs to be a valid zuul timer format, e.g. daily is ‘0 0 * * *’.
The yaml files in the config repository represent the list of mirrors as documented here:
https://github.com/cschwede/mirror2swift. For example, config/mirrors/centos.yaml:
- name: os
type: repodata
url: 'http://centos.mirror.example.com/7/os/x86_64/'
prefix: 'os/'
Question 8. How To Restart A Config-update Job ?
Answer :
When the config-update job fails, you can manually restart the job using the command bellow. Make sure to set the ref-sha which is the last commit hash of the config repository.
zuul enqueue-ref --trigger gerrit --tenant local --pipeline post --project config --ref master --newrev ref-sha
The job will be running in the post pipeline of the Zuul status page.
Question 9. How Can I Use The Gerrit Rest Api?
Answer :
The Gerrit REST API is open for queries by default on all Software Factory deployments.
There is an extensive documentation available online:
https://gerrit-review.googlesource.com/Documentation/rest-api.html
The Gerrit API is available at the https://fqdn/r/ endpoint for non authenticated requests and for authenticated requests it is https://fqdn/r/a/.
To use the authenticated endpoint you have to create an API password first. To do so, go to the User Settings page (upper right corner on the top menu) and click on the button Generate new API key.
For example:
getting open changed with cURL would be:
curl "http://fqdn/r/changes/?q=status:open"
And to access a restricted resources with cURL would be:
curl -u username:apikey https://fqdn/r/a/accounts/self/password.http
Question 10. How Can I Use Gertty?
Answer :
After getting a Gerrit API key (as explained in), use the basic auth-type in gertty.yaml,
Example:
servers:
- name: sftests
url: https://sftests.com/r/a/
git-url: ssh://USER_NAME@sftests.com:29418
auth-type: basic
username: USER_NAME
password: API_KEY
git-root: ~/git/
Gerrit Related Tutorials |
|
---|---|
Python Tutorial | Web Services Tutorial |
HTML 5 Tutorial | Adv Java Tutorial |
Git (software) Tutorial | Jenkins Tutorial |
Gerrit Related Practice Tests |
|
---|---|
Python Practice Tests | Web Services Practice Tests |
HTML 5 Practice Tests | Adv Java Practice Tests |
Git (software) Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.