-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
220 lines (203 loc) · 9.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
---
sudo: required
dist: bionic
env:
global:
# auto vagrant installation
notifications:
slack:
on_failure: always
# fleet_script_tasks : &fleet_script_tasks
# script:
# - python --version
# fleet_install_tasks : &fleet_install_tasks
# install:
# - pip install -r requirements.txt
matrix:
fast_finish: true
include:
- name: "podman Python 3.7 on bionic amd64" #OK
dist: bionic
language: python
python: 3.7
before_install:
- pip3 install virtualenv
- virtualenv -p $(which python3) ~venvpy3
- source ~venvpy3/bin/activate
- python --version
- pip install -r requirements.txt
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
script:
- . /etc/os-release
- sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
- sudo apt-get update -qq
- sudo apt-get -qqy install podman slirp4netns
- podman info #his command displays the information related to the host such as the Kernel version, swap space used
- "podman build ." # build local image
- sudo podman run -p 80:80 -dit centos
- podman info --debug
- podman ps -a
- podman pull alpine #Pull Alpine docker image
- podman run --rm alpine uname -a
- podman pull ubuntu
- podman run --rm ubuntu /bin/echo "Hola podman" #run a simple container using Ubuntu image which prints a message
- podman pull centos:8
- podman run --rm centos:8 uname -a
- podman ps #list creating and running containers
- podman ps --all # To include stopped / exited containers
- podman ps -a
- podman images #lists all the images
- ls -lai /var/lib/containers #Podman’s local repository
- podman pod create --name web #create a pod called web,By default, the created pod will have a container called infra
- podman pod list
- podman ps -a --pod #The infra container is in sleep mode and its purpose is to hold the namespaces associated with the pod to allow podman to connect other containers to the pod
- podman run -dt --pod web alpine:latest top # add a container to the pod
- podman ps -a --pod # pause containers!!
- sudo podman pod create -p 8080:80 --name web1 #expose a port – root required for port binding
- podman pod create --name webpod #create a pod called web,By default, the created pod will have a container called infra
- podman pod list #The pod create command creates a pod with an infra container by default associated with it unless explicitly set with infra flag as false.
after_success:
- deactivate
# - name: "podman kubectl k8s Python 3.7 on bionic amd64" #OK
# dist: bionic
# language: python
# python: 3.7
# before_install:
# - pip3 install virtualenv
# - virtualenv -p $(which python3) ~venvpy3
# - source ~venvpy3/bin/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# - | #To check if virtualization is supported on Linux, run the following command and verify that the output is non-empty:
# set -eo pipefail #safety for script
# if [[ $(egrep -c '(vmx|svm)' /proc/cpuinfo) == 0 ]]; then #check if virtualization is supported on Linux, xenial fails w 0, bionic works w 2
# echo "virtualization is not supported"
# else
# echo "===================================="
# echo eval "$(egrep -c '(vmx|svm)' /proc/cpuinfo)" 2>/dev/null
# echo "===================================="
# echo "virtualization is supported"
# fi
# - | # Install kubectl
# curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \
# chmod +x ./kubectl && \
# sudo mv ./kubectl /usr/local/bin/kubectl &&
# kubectl version --client
# # Install podman
# - . /etc/os-release
# - sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
# - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
# - sudo apt-get update -qq
# - sudo apt-get -qqy install podman slirp4netns #https://github.com/rootless-containers/slirp4netns
# - sudo podman run -dt -p 8000:80 --name demo quay.io/libpod/alpine_nginx:latest #create a simple Podman container running nginx and binding the host’s port 8000 to the container’s port 80
# - sudo podman ps #
# - curl http://localhost:8000
# after_success:
# - deactivate
# - name: "podman machine qemu kvm libvirt Python 3.7 on xenial amd64" #OK
# dist: xenial
# language: python
# python: 3.7
# before_install:
# - pip3 install virtualenv
# - virtualenv -p $(which python3) ~venvpy3
# - source ~venvpy3/bin/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# - sudo apt-get install -qqy libvirt-bin qemu-kvm #Install libvirt and qemu-kvm
# #Install docker-machine
# - |
# curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && \
# sudo chmod +x /tmp/docker-machine && \
# sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
# after_success:
# - deactivate
# # # =============================================macOS=============================================
# - name: "podman-machine podman virtualbox Python 2.7.17 on macOS 10.15.4 osx xcode11.5"
# os: osx
# osx_image: xcode11.5
# language: shell
# addons:
# homebrew:
# packages:
# casks: # Installing Casks
# - podman
# update: true
# before_install:
# - pip install virtualenv
# - virtualenv -p $(which python2) ~venvpy2
# - source ~venvpy2/bin/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# - |
# curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
# chmod +x /usr/local/bin/docker-machine
# after_success:
# - deactivate
# - name: "podman Python 2.7.17 on macOS 10.15.4 osx xcode11.5"
# os: osx
# osx_image: xcode11.5
# language: shell
# addons:
# homebrew:
# packages:
# casks: # Installing Casks
# - podman
# update: true
# before_install:
# - pip install virtualenv
# - virtualenv -p $(which python2) ~venvpy2
# - source ~venvpy2/bin/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# - brew cask info podman
# after_success:
# - deactivate
# - name: "podman kubectl k8s Python 2.7.17 on macOS 10.15.4 osx xcode11.5"
# os: osx
# osx_image: xcode11.5
# language: shell
# addons:
# homebrew:
# packages:
# - kubectl #kubernetes-cli 1.18.3
# casks: # Installing Casks
# - podman
# update: true
# before_install:
# - pip install virtualenv
# - virtualenv -p $(which python2) ~venvpy2
# - source ~venvpy2/bin/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# - brew cask info podman
# after_success:
# - deactivate
# # =============================================windows=============================================
# - name: "podman-machine Python 3.8 on Windows"
# os: windows
# language: shell
# env:
# - PATH=/c/Python38:/c/Python38/Scripts:$PATH
# before_install:
# - choco install python --version 3.8.1
# - pip install virtualenv
# - virtualenv $HOME/venv
# - source $HOME/venv/Scripts/activate
# <<: *fleet_install_tasks
# <<: *fleet_script_tasks
# script:
# # travisci git bash support
# - |
# if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \
# curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && \
# chmod +x "$HOME/bin/docker-machine.exe"
# after_success:
# - deactivate