Skip to content

Instantly share code, notes, and snippets.

@f4rx
Last active September 1, 2019 19:45
Show Gist options
  • Select an option

  • Save f4rx/fb900f1d3ecee9a99854e2e901637fa5 to your computer and use it in GitHub Desktop.

Select an option

Save f4rx/fb900f1d3ecee9a99854e2e901637fa5 to your computer and use it in GitHub Desktop.
Run OpenStack CLi

Работать c openstack утилитой можно локально (на ноутбуки или персональном компьютере), запустив докер-образ

docker run -ti --rm -v $(pwd)/rc.sh:/rc.sh  docker-registry.selectel.ru/f3ex/openstack_client:0.3

Так же вы можете рассмотреть вариант самостоятельной установки по инструкции https://kb.selectel.ru/22060427.html (в рамках занятия не рекомендуется из-за длительной установки)

FROM alpine:edge
RUN apk add --update --no-cache python py-pip git python-dev libffi libffi-dev bash-completion \
openssl openssl-dev build-base iputils bash curl linux-headers && \
apk add py-cffi py-tz py-pbr py-setuptools && \
pip install -UI git+https://github.com/openstack/python-openstackclient.git@stable/stein \
git+https://github.com/openstack/python-heatclient.git@stable/stein \
git+https://github.com/openstack/python-octaviaclient.git@stable/stein \
git+https://github.com/openstack/python-magnumclient.git@stable/stein \
&& apk del build-base linux-headers python-dev libffi-dev openssl-dev && rm -rf /var/cache
RUN openstack complete > /etc/profile.d/openstack.sh
RUN echo "source /etc/profile.d/bash_completion.sh" >> /root/.bashrc && echo "source /etc/profile.d/openstack.sh" >> /root/.bashrc && \
echo "OK"
COPY Dockerfile /Dockerfile
CMD /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment