https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842016-06-26T20:21:38ZopenSUSE Project Management ToolopenQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=247122016-06-26T20:21:38Zokurzokurz@suse.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-4 status-3 priority-6 priority-high2 closed" href="/issues/12370">action #12370</a>: toolchain/crash - test uses incorrect</i> added</li></ul> openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=720492017-11-18T07:07:00Zcoolocoolo@suse.com
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li><li><strong>Target version</strong> set to <i>Ready</i></li></ul><p>neither salt nor jenkins can do 'auto', but both can do polling :)</p>
<p>So you can have a crontab to git pull, just as we git pull the pillars.</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=720852017-11-18T15:22:44Zpevikpetr.vorel@gmail.com
<ul></ul><p>coolo wrote:</p>
<blockquote>
<p>neither salt nor jenkins can do 'auto', but both can do polling :)</p>
<p>So you can have a crontab to git pull, just as we git pull the pillars.</p>
</blockquote>
<p>At least jenkins has can trigger build after git push [1] [2] (no need to have a crontab) :). </p>
<p>[1] <a href="https://wiki.jenkins.io/display/JENKINS/Git+Plugin#GitPlugin-Pushnotificationfromrepository" class="external">https://wiki.jenkins.io/display/JENKINS/Git+Plugin#GitPlugin-Pushnotificationfromrepository</a><br>
[2] <a href="https://wiki.jenkins.io/display/JENKINS/GitHub+Plugin#GitHubPlugin-GitHubhooktriggerforGITScmpolling" class="external">https://wiki.jenkins.io/display/JENKINS/GitHub+Plugin#GitHubPlugin-GitHubhooktriggerforGITScmpolling</a></p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=721272017-11-18T16:29:22Zcoolocoolo@suse.com
<ul></ul><p>"Note: Custom Git hooks must be configured on the filesystem of the GitLab server. Only GitLab server administrators will be able to complete these tasks." - are you?</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=767342017-12-04T19:54:04Zokurzokurz@suse.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul><p>ok. osd has direct access to gitlab.suse.de so I just added the following to <code>/etc/cron.d/sles</code>:</p>
<pre><code>*/5 * * * * root cd /opt/openqa-scripts && git fetch --all && git checkout --force "origin/master"
</code></pre>
<p>so from now on the scripts coming from <a href="https://gitlab.suse.de/openqa/scripts" class="external">https://gitlab.suse.de/openqa/scripts</a> are automatically deployed to osd at least. o3 has no direct access to gitlab.suse.de so we must look for an intermediate host which would do that deployment. Any suggestions which host that should be?</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=1640362018-11-10T17:11:42Zokurzokurz@suse.com
<ul><li><strong>Subject</strong> changed from <i>openqa-scripts on osd/o3 should be deployed automatically (CD)</i> to <i>[functional][y] openqa-scripts on osd/o3 should be deployed automatically (CD)</i></li><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Workable</i></li></ul><p>By now I think the deployment to o3 (maybe the same for osd) should be done by a gitlab-runner on a host within the SUSE network that can access o3. I am sure without the involvement of y-team this will not move on.</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=1682722018-11-23T14:39:34Zmkittlermarius.kittler@suse.com
<ul><li><strong>Project</strong> changed from <i>openQA Project</i> to <i>openQA Infrastructure</i></li><li><strong>Category</strong> deleted (<del><i>168</i></del>)</li></ul><p>Seems to be an infra issue.</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=1683412018-11-24T07:03:42Zokurzokurz@suse.com
<ul></ul><p>mkittler wrote:</p>
<blockquote>
<p>Seems to be an infra issue.</p>
</blockquote>
<p>Depends. One can argue the actual necessity for openqa-scripts is a "feature request" to openQA</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=2283682019-07-18T09:31:55Zokurzokurz@suse.com
<ul><li><strong>Subject</strong> changed from <i>[functional][y] openqa-scripts on osd/o3 should be deployed automatically (CD)</i> to <i>openqa-scripts on osd/o3 should be deployed automatically (CD)</i></li><li><strong>Status</strong> changed from <i>Workable</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>okurz</i></li></ul><p>Created an SSH keypair following <a href="https://docs.gitlab.com/ee/ssh/README.html#generating-a-new-ssh-key-pair" class="external">https://docs.gitlab.com/ee/ssh/README.html#generating-a-new-ssh-key-pair</a> with</p>
<pre><code>ssh-keygen -t ed25519 -C o3-openqa-scripts-deployment
</code></pre>
<p>stored the public key on<br>
<a href="https://gitlab.suse.de/openqa/scripts/-/settings/ci_cd" class="external">https://gitlab.suse.de/openqa/scripts/-/settings/ci_cd</a><br>
in a protected and masked variable SSH_PRIVATE_KEY and the output of</p>
<pre><code>ssh-keyscan -p 2215 proxy-opensuse.suse.de
</code></pre>
<p>in a variable SSH_KNOWN_HOSTS .</p>
<p>On o3 I created a new user, added the public key, changed the folder /opt/openqa-scripts to be owned by that user (and still group root) and gave a password to the user, otherwise ssh login is denied by PAM authentication. Stored the password in my personal password manager but it should actually never be necessary</p>
<pre><code>useradd -m -s /bin/false o3-openqa-scripts-deployment
(cd /opt/openqa-scripts && chmod -R g+w . && chown -R o3-openqa-scripts-deployment .)
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+lN+JTRW9hNlC8E/1krDNYbMlKhV7p4sdvhJqN1WCn o3-openqa-scripts-deployment' >> /home/o3-openqa-scripts/.ssh/authorized_keys
passwd o3-openqa-scripts
</code></pre>
<p>tried to push with</p>
<pre><code>GIT_SSH_COMMAND='ssh -i ~/id_ed25519_o3_openqa_scripts_deployment' git push o3-openqa-scripts@o3:/opt/openqa-scripts/
</code></pre>
<p>and then created <a href="https://gitlab.suse.de/openqa/scripts/merge_requests/355" class="external">https://gitlab.suse.de/openqa/scripts/merge_requests/355</a></p>
<p>and finally a successful pipeline job with the deployment done: <a href="https://gitlab.suse.de/openqa/scripts/-/jobs/102296" class="external">https://gitlab.suse.de/openqa/scripts/-/jobs/102296</a></p>
<p>Thanks to nsinger for the nice pair-programming session.</p>
<p>I will keep this ticket open for some time to get feedback from any of you if we should also adopt osd in the same way or not.</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=2501122019-10-15T09:59:54Zokurzokurz@suse.com
<ul></ul><p>As discussed in <a href="https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/106#note_184745" class="external">https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/106#note_184745</a> decided to do the same approach for OSD: <a href="https://gitlab.suse.de/openqa/scripts/merge_requests/397" class="external">https://gitlab.suse.de/openqa/scripts/merge_requests/397</a> . Merged.</p>
<p>Created <a href="https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/202" class="external">https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/202</a> to delete the cron job for updating the scripts working copy.</p>
openQA Infrastructure - action #12506: openqa-scripts on osd/o3 should be deployed automatically (CD)https://progress.opensuse.org/issues/12506?journal_id=2516182019-10-21T15:10:15Zokurzokurz@suse.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p><a href="https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/202" class="external">https://gitlab.suse.de/openqa/salt-states-openqa/merge_requests/202</a> merged. Checked manually on osd and also again o3 that there are no cron-job leftovers.</p>