Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Implement Screwdriver command for installing Docker (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Jul 24, 2024
1 parent 0561d9f commit d987161
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 23 deletions.
24 changes: 24 additions & 0 deletions adaptors/screwdriver-cd/commands/install-docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -x
set -e

# Copyright Jiaqi Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apt update
apt upgrade -y
apt install git -y
git clone https://github.com/QubitPi/docker-install.git
cd docker-install
sh install.sh
10 changes: 10 additions & 0 deletions adaptors/screwdriver-cd/commands/install-docker/sd-command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace: QubitPi
name: install-docker
version: '1.0.0'
description: Install Docker compatible on all OS platforms, including Unix and Linux
usage: |
sd-cmd exec QubitPi/install-docker@latest
maintainer: [email protected]
format: binary
binary:
file: ./run.sh
27 changes: 4 additions & 23 deletions docs/blog/2022-10-31-jenkins-on-aws/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ SSL, in the context of using in Jenkins. After a brief description of exactly wh
for, the section will further illustrate the practical usage of OpenSSL in Jenkins service for the purpose of serving
secured Jenkins resources from our EC2 instance.
While previous familiarity with Server Sockets Layer (SSL), or the OpenSSL implementation in particular, is not required
for this section, if desired, the reader is advised to pursue further learning from the [resources](#resources) listed
below in order to broaden his/her understanding of this powerful security layer.
While previous familiarity with Server Sockets Layer (SSL), or the [OpenSSL](https://help.ubuntu.com/community/OpenSSL)
implementation in particular, is not required for this section, if desired, the reader is advised to pursue further
learning from the [resources](#resources) listed below in order to broaden his/her understanding of this powerful
security layer.
### Resources
Expand All @@ -278,26 +279,6 @@ below in order to broaden his/her understanding of this powerful security layer.
- [OpenSSL Website](http://www.openssl.org/)
- [Public Key Infrastructure (X.509) (pkix)](http://www.ietf.org/html.charters/pkix-charter.html)
### About OpenSSL
**Secure Sockets Layer** is an application-level protocol which was developed by the Netscape Corporation for the
purpose of transmitting sensitive information, such as Credit Card details, via the Internet. SSL works by using a
private key to encrypt data transferred over the SSL-enabled connection, thus thwarting eavesdropping of the
information. The most popular use of SSL is in conjunction with web browsing (using the HTTP protocol), but many network
applications can benefit from using SSL. By convention, URLs that require an SSL connection start with "https:" instead
of "http:"
**OpenSSL** is a robust, commercial-grade implementation of SSL tools, and related general purpose library based upon
SSLeay, developed by Eric A. Young and Tim J. Hudson. OpenSSL is available as an Open Source equivalent to commercial
implementations of SSL via an [Apache-style license](http://www.openssl.org/source/license.html).
#### About X.509
X.509 is a specification for digital certificates published by the International Telecommunications Union -
Telecommunication (ITU-T). It specifies information and attributes required for the identification of a person or a
computer system, and is used for secure management and distribution of digitally signed certificates across secure
Internet networks. OpenSSL most commonly uses X.509 certificates.
### Installing OpenSSL Toolkit
AWS EC2 instance usually have OpenSSL installed and configured properly.
Expand Down
9 changes: 9 additions & 0 deletions screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ jobs:
environment:
SD_TEMPLATE_PATH: adaptors/screwdriver-cd/templates/docker-mailserver-sd-template.yaml

validate-install-docker:
requires: [~pr, ~commit]
steps:
- validate: sd-cmd validate -f adaptors/screwdriver-cd/commands/install-docker/sd-command.yaml
publish-install-docker:
requires: [validate-install-docker]
steps:
- publish: sd-cmd publish -f adaptors/screwdriver-cd/commands/install-docker/sd-command.yaml -t latest

validate-install-hashicorp-packer-ubuntu:
requires: [~pr, ~commit]
steps:
Expand Down

0 comments on commit d987161

Please sign in to comment.