Jump to content

Need help with making procedure to deploy to test and production servers

Filingo

I am a not so experienced developer and I moved to a new workplace where the senior left and I am the most experienced there. . .🤦 Which is bad.

But I know the way they deploy to their test and production servers is not good. This is how things work right now:

 

They only have 1 branch in git.. the master branch. They do everything on it. Not even making new branches for new features. Just work on master and push/pull to master.

And how they deploy? They pull the latest changes and upload the entire folder every time to the test/production server via RDP (Windows Server)

 

I wanted to do what we were doing in the previous work place. But I don't know exactly what/how they were doing it. I just know we had test branch and master branch (And perhaps more that I haven't encountered since I did not deal with it too much)

 

So I suggested them to do the same here: create a new test branch, and every time they have any new thing to do: fix a bug, make a feature, update a feature and so on, create a new branch from the test branch, and if it's ok push to test branch and merge.

 

If everything works, merge with master.

 

Is it ok? But then I am left with the other thing: How to actually deploy it? How do I stop this routine of copying the entire folders to the servers?

Should I install git in both test and production server, and then pull the test branch to the test server and pull the master branch to production? I remember where I worked before they had something called "tag" before they were deploying to production/test. Though not sure exactly the procedure.

 

What would you recommend?

 

Ty

 

Link to comment
Share on other sites

Link to post
Share on other sites

You can do it the way you suggest, installing git on the server to pull the files, that'll make it a little easier. The better solution would be an automated script that does that automatically (and any other thing that may be needed, like building or updating database). You can look into github actions which can do deployment automatically every time you push to a specific branch or on demand. Specific hosting services also have their own versions of this, such as azure pipelines or AWS CodeDeploy.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Kopaka said:

You can do it the way you suggest, installing git on the server to pull the files, that'll make it a little easier. The better solution would be an automated script that does that automatically (and any other thing that may be needed, like building or updating database). You can look into github actions which can do deployment automatically every time you push to a specific branch or on demand. Specific hosting services also have their own versions of this, such as azure pipelines or AWS CodeDeploy.

thanks, I have to find only locally available solutions it's a secured network I can't connect to outside services 😕

but if there are packages that can be installed locally and do that it can work. Is something like Jenkins can do that instead of github actions?

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Filingo said:

thanks, I have to find only locally available solutions it's a secured network I can't connect to outside services 😕

but if there are packages that can be installed locally and do that it can work. Is something like Jenkins can do that instead of github actions?

I don't have any experience with that personally, but from a quick look on the site Jenkins pipeline should be able to do the same https://www.jenkins.io/doc/book/pipeline/

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Kopaka said:

I don't have any experience with that personally, but from a quick look on the site Jenkins pipeline should be able to do the same https://www.jenkins.io/doc/book/pipeline/

Thank you! I will request them to get it. As I mentioned since it's a secured network everything passes through security team first. Until it is accepted, do you have any suggestion to do with available options? Or for now what I suggested is alright with manually doing it? They might reject that as well as happened in the past that's why I just wonder what else I can do to make things better.

 

Any tips if I am stuck with the manual solution? Maybe you would change things a bit from the way I said it?

Link to comment
Share on other sites

Link to post
Share on other sites

So the company has a security department but your team is not using version control properly and there is no CI/CD. If you can find senior engineers in other teams try to reach out to them and get some help. If things don't improve then don't get stuck in that team for too long.

 

ಠ_ಠ

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, shadow_ray said:

So the company has a security department but your team is not using version control properly and there is no CI/CD. If you can find senior engineers in other teams try to reach out to them and get some help. If things don't improve then don't get stuck in that team for too long.

 

 

I know that we're a relatively new team and the only one to use PHP there so it wasn't even on my mind to reach other seniors, but you're right I can get some help regarding CI/CD and deployment, good idea, thank you

 

But also that's my chance to learn how to do that (since I'm a junior myself)

 

Link to comment
Share on other sites

Link to post
Share on other sites

At my workplace we use a headless platform call vercel to do deployment. There are other parts of the web application that are deployed via AWS cloud formation.

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, Filingo said:

CI/CD and deployment

don't forget CI/CD is not a cure all. It's not implementable everywhere.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×