New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to read static configuration from git repository without building data only container? #34
Comments
Hey Daniel, yes, the source is this repository; I just realized I hadn't recreated the documentation on readthedocs in a while, have to look into automating that (I actually thought it would react to git changes, but apparently it doesn't). Running all of these things "natively" (i.e. not in docker) is currently not actively supported, so there is usually no need to build your own wicked containers (they're published to hub.docker.com). Check out this on how to use the Kickstarter to create your configuration repository: And this on how to create a When you have that up and running, it's usually a small step to get it up and running on an external docker host (it's just a question of which If you get stuck anyplace, feel free to file an issue here (like this one). And in case of doubt, this repository is the source of truth. Best regards, |
Hello Martin, Thx already for your reply: That is just the case... I want to run the Also is there a ENV VAR that we can provide to not launch the portal api Kind regards, Daniel Daniel Vangrieken Email : daniel.vangrieken@gmail.com 2016-11-22 16:40 GMT+01:00 Martin Danielsson notifications@github.com:
|
Hi David, Unfortunately I'm not familiar with Mesos, but there has to be a means of storing persistent data for it. It doesn't matter much which means you choose, as long as the static data ends up at /var/portal-api/static, and the data in /var/portal-api/dynamic is persisted. There are multiple volumes involved:
This seems to be the way currently: https://mesosphere.github.io/marathon/docs/persistent-volumes.html or using "external volumes". It's not rocket science with the volumes at all, it's just one solution on how to persist data in your APIm configuration and dynamic data. But you won't get around using volumes one way or the other. Can you use locally built docker images with Mesos? In that case you can, if you just copy your static configuration into a container image based on Please report back how things are going and if you think I can help more. BR, Martin |
FWIW, it seems I am running into similar problems when deploying to a Kubernetes Cluster. |
If you have a private repository you can use, then you can use the following Dockerfile inside the FROM haufelexware/wicked.portal-api:<desired version tag>
COPY . /tmp/portal-api
RUN rm -rf /var/portal-api/static \
&& cp -R /tmp/portal-api /var/portal-api/static \
&& date +%s > /var/portal-api/static/.dockerbuild \
&& date -u "+%Y-%m-%d %H:%M:%S" > /var/portal-api/static/build_date
CMD ["npm", "start"] Push the resulting image to your private repository, and use that instead of the You still have to have a volume (but an initially empty one) for As soon as I have my Kubernetes thing running, I may be able to say more (and document it). If you have a Mesos installation of wicked running, I would happily incorporate hints on how to run wicked on Mesos into the documentation. /Martin |
Will try out the following thing for use with Mesos/Kubernetes: If you supply Like this: Would that solve your issue? |
- Enable reading configuration from git, to be able to support Mesos and Kubernetes, see Haufe-Lexware/wicked.haufe.io#34
Hello Martin,
Sorry for the late reply.
I got everything working on mesos but it will not allow us to make some
automated build and deploying platform and this is ofcourse what we want.
What I currently did was manually copy the static data folder on to a node
in the cloud. In that node I manually launched a docker container with a
mounted volume to the copied static folder. Then the docker is launched
without errors. (during the launch of the docker I also mounted a rex-ray
volume to a tmp dir). After the launch I moved the static folder onto the
external mounted rex-ray volume. Then and only then we were able to launch
the Portal Api via a marathon config file since it then could find the
static data required to operate.
It would be beter that one could build a docker image that would copy the
static data folder created by kickstarter into the docker image itself.
Like mentioned: this is a static folder so why would you create a separate
mount volume for it.
At that moment in time you could version your Dockerfile + static data
content in GIT. In Docker cloud one create a new label/tag tag will be used
within the marathon / cubernetes config file.
This would make live so much easier for everyone.
Don't you agree?
PS: The pasword thing with GIT could create a security bridge to private
repos.
Kind regards,
Daniel
================================================================
Daniel Vangrieken
Email : daniel.vangrieken@gmail.com
Phone: +32 (0) 476 / 99 65 61
2016-11-28 11:35 GMT+01:00 Martin Danielsson <notifications@github.com>:
… Will try out the following thing for use with Mesos/Kubernetes: If you
supply GIT_CREDENTIALS (username:password) and GIT_REPO (and optionally
GIT_REPO), the portal-api would check out the configuration from the
supplied git repository using the given credentials.
Like this: git clone https://${GIT_CREDENTIALS}@${GIT_REPO}.
Would that solve your issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS4X3m0i7Rxip6xsJca0_Qi4SMBcZesVks5rCq5xgaJpZM4K5VKY>
.
|
The next update of the wicked Portal API will be able to at startup clone a specific version of a git repository into the container, without the need of creating a volume for it. The "old" way of injecting a volume will still work, you just have to leave out the git credentials and repository. If you feel like testing it out, you may (don't use for production!) pull the |
OK, so this will come in 0.11.0, currently working on the documentation. Would you mind sharing some information on how to run this on Mesos as soon as the 0.11.0 release is out? |
Hello Martin,
Currently we make use of a private Docker images that has the static folder
generated by "kickstarter" within its image. We didn't prefer to make use
of the GIT pull stuff due to security issues. I have although a lot of
other questions which I will add as an issue in your GIT Repository.
Kind regards,
Daniel
================================================================
Daniel Vangrieken
Email : daniel.vangrieken@gmail.com
Phone: +32 (0) 476 / 99 65 61
2016-12-09 9:46 GMT+01:00 Martin Danielsson <notifications@github.com>:
… OK, so this will come in 0.11.0, currently working on the documentation.
Would you mind sharing some information on how to run this on Mesos as soon
as the 0.11.0 release is out?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS4X3kBzxZ75dqWJUD9XU2V8BFsL6erKks5rGRVvgaJpZM4K5VKY>
.
|
Sure, go ahead. If you don't mind, I'd close this issue? |
OK |
From which Haufe-Lexware repo comes the content of http://wickedhaufeio.readthedocs.io/en/latest/
I thought it would be this repo, which I quess it is... but the readthedocs is not updated with the changes made 18 days ago. Anyhow: I am trying to run this service on DC/OS but building the wicked-api documentation is not sufficient with my experience. In the readthedocs there is a reference to docker-build.sh which I can't find in any of the Haufe-Lexware repos.
In other documentation I read the following: The STATIC CONFIG is created at deployment time by building a static configuration container directly on the docker host which is to host the API Portal. This is usually done by keeping a special Dockerfile inside the deployment repository, which in turn clones the configuration repository into this container.
So I indeed created a repository, but I have no clue which how to address this repo to the docker image on docker hub. Are do I have to write this intelligence my self... then I would be handy on how to build the wicked-api
Thx for your help and feedback.
Daniel
The text was updated successfully, but these errors were encountered: